﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Text;
using netDxf;
using netDxf.Blocks;
using netDxf.Collections;
using netDxf.Entities;
using netDxf.Header;
using netDxf.Objects;
using netDxf.Tables;
using netDxf.Units;
using Attribute = netDxf.Entities.Attribute;
using Image = netDxf.Entities.Image;
using Point = netDxf.Entities.Point;
using Trace = netDxf.Entities.Trace;
namespace TestDxfDocument
{
    class Matingpoint
    {
        
        public static void Matingpoint1(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double r = 13.5;
            double r1 = 30;
            double f = 1;
            double pi = Math.PI;
            double par = 28 * pi / 180;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X - f, v1.Y + f);
            Vector2 v3 = new Vector2(v1.X - f, v1.Y - f);
            Vector2 v4 = new Vector2(v2.X, v2.Y + r - r / 3);
            Vector2 v5 = new Vector2(v4.X + f, v4.Y + f / 2 / Math.Tan(par));
            Vector2 v6 = new Vector2(v5.X + r + f * 6, v5.Y + f * 4 / 5);
            Vector2 v7 = new Vector2(v1.X + f * 3.6, v1.Y);
            Vector2 v8 = new Vector2(v7.X + f, v7.Y - f / 2 / Math.Tan(par));
            Vector2 v9 = new Vector2(v8.X, v8.Y - f * 6);
            Vector2 v10 = new Vector2(v9.X - f, v9.Y - f / 2 / Math.Tan(par));
            Vector2 v11 = new Vector2(v10.X - f * 3.6, v10.Y);
            Vector2 v12 = new Vector2(v11.X - f, v11.Y - f);
            Vector2 v13 = new Vector2(v12.X, v12.Y - r + r / 3);
            Vector2 v14 = new Vector2(v13.X + f, v13.Y - f / 2 / Math.Tan(par));
            Vector2 v15 = new Vector2(v14.X + r + f * 6, v14.Y - f * 4 / 5);
            //
            Vector2 v16 = new Vector2(v6.X + f, v6.Y);
            Vector2 v17 = new Vector2(v15.X + f, v15.Y);
            Vector2 v18 = new Vector2(v16.X, v16.Y + f * 5);
            Vector2 v19 = new Vector2(v17.X, v17.Y - f * 5);
            Vector2 v20 = new Vector2(v18.X + r, v18.Y);
            Vector2 v21 = new Vector2(v19.X + r, v19.Y);
            //
            Vector2 v22 = new Vector2(v20.X, v16.Y + f);
            Vector2 v23 = new Vector2(v21.X, v17.Y - f);
            Vector2 v24 = new Vector2(v22.X + r / 1.3, v22.Y);
            Vector2 v25 = new Vector2(v23.X + r / 1.3, v23.Y);
            Vector2 v26 = new Vector2(v24.X, v24.Y + f * 1.6);
            Vector2 v27 = new Vector2(v25.X, v25.Y - f * 1.6);
            Vector2 v28 = new Vector2(v26.X + r / 1.3, v26.Y);
            Vector2 v29 = new Vector2(v27.X + r / 1.3, v27.Y);
            //
            Vector2 v30 = new Vector2(v29.X, v29.Y + f / 2);
            Vector2 v31 = new Vector2(v30.X + f * 5, v30.Y);
            Vector2 v32 = new Vector2(v28.X, v28.Y - f / 2);
            Vector2 v33 = new Vector2(v32.X + f * 5, v32.Y);

            Vector2 v34 = new Vector2(v31.X, v31.Y + f * 9);
            Vector2 v35 = new Vector2(v30.X, v34.Y);

            Vector2 v36 = new Vector2(v33.X, v33.Y - f * 9);
            Vector2 v37 = new Vector2(v30.X, v36.Y);

            Vector2 v38 = new Vector2(v30.X, v36.Y - f);
            Vector2 v39 = new Vector2(v38.X + r, v38.Y);

            Vector2 v40 = new Vector2(v30.X, v34.Y + f);
            Vector2 v41 = new Vector2(v38.X + r, v40.Y);
            Vector2 v42 = new Vector2(v39.X + f, v39.Y - f);
            Vector2 v43 = new Vector2(v41.X + f, v41.Y + f);
            //

            Vector2 v44 = new Vector2(v1.X + r + f * 7, v1.Y - f * 4);

            Vector2 v45 = new Vector2(v44.X - f * 10, v44.Y + f * 8);
            Vector2 v46 = new Vector2(v44.X, v44.Y + f * 3);
            //
            Vector2 v47 = new Vector2(v1.X + r + f * 7 + r * 2 + f * 7, v1.Y - f * 4);
            // 线段
            //主视图
            Vector2[] Line1 = { v1, v2 };
            fun.drawBLine(dxf, Line1, 0.12, contour);
            //Vector2[] Line2 = { v1, v3 };
            //fun.drawBLine(dxf, Line2, 0.08, contour);
            Vector2[] Line3 = { v2, v4 };
            fun.drawBLine(dxf, Line3, 0.12, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v4));
            Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            Arc1.Vertexes[0].Bulge = -f / 2 * Math.Tan(par / 1.3) / Math.Sin(par);
            fun.PolyFill(dxf, Arc1, 0.12, contour);
            Vector2[] Line4 = { v5, v6 };
            fun.drawBLine(dxf, Line4, 0.12, contour);
            Vector2[] Line5 = { v1, v7 };
            fun.drawBLine(dxf, Line5, 0.12, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v7));
            Arc2.Vertexes.Add(new LwPolylineVertex(v8));
            Arc2.Vertexes[0].Bulge = -f / 2 * Math.Tan(par / 1.3) / Math.Sin(par);
            fun.PolyFill(dxf, Arc2, 0.12, contour);
            Vector2[] Line6 = { v8, v9 };
            fun.drawBLine(dxf, Line6, 0.12, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v9));
            Arc3.Vertexes.Add(new LwPolylineVertex(v10));
            Arc3.Vertexes[0].Bulge = -f / 2 * Math.Tan(par / 1.3) / Math.Sin(par);
            fun.PolyFill(dxf, Arc3, 0.12, contour);
            Vector2[] Line8 = { v10, v11 };
            fun.drawBLine(dxf, Line8, 0.12, contour);
            Vector2[] Line9 = { v12, v11 };
            fun.drawBLine(dxf, Line9, 0.12, contour);
            Vector2[] Line10 = { v12, v13 };
            fun.drawBLine(dxf, Line10, 0.12, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v13));
            Arc4.Vertexes.Add(new LwPolylineVertex(v14));
            Arc4.Vertexes[0].Bulge = f / 2 * Math.Tan(par / 1.3) / Math.Sin(par);
            fun.PolyFill(dxf, Arc4, 0.12, contour);
            Vector2[] Line11 = { v14, v15 };
            fun.drawBLine(dxf, Line11, 0.12, contour);
            Vector2[] Line12 = { v6, v15 };
            fun.drawBLine(dxf, Line12, 0.12, contour);
            Vector2[] Line13 = { v6, v16 };
            fun.drawBLine(dxf, Line13, 0.12, contour);
            Vector2[] Line14 = { v17, v15 };
            fun.drawBLine(dxf, Line14, 0.12, contour);
            Vector2[] Line15 = { v17, v16 };
            fun.drawBLine(dxf, Line15, 0.12, contour);
            Vector2[] Line16 = { v18, v16 };
            fun.drawBLine(dxf, Line16, 0.12, contour);
            Vector2[] Line17 = { v19, v17 };
            fun.drawBLine(dxf, Line17, 0.12, contour);
            Vector2[] Line18 = { v18, v20 };
            fun.drawBLine(dxf, Line18, 0.12, contour);
            Vector2[] Line19 = { v19, v21 };
            fun.drawBLine(dxf, Line19, 0.12, contour);
            Vector2[] Line20 = { v20, v21 };
            fun.drawBLine(dxf, Line20, 0.12, contour);
            Vector2[] Line21 = { v22, v24 };
            fun.drawBLine(dxf, Line21, 0.12, contour);
            Vector2[] Line22 = { v23, v25 };
            fun.drawBLine(dxf, Line22, 0.12, contour);
            Vector2[] Line23 = { v25, v24 };
            fun.drawBLine(dxf, Line23, 0.12, contour);
            Vector2[] Line24 = { v28, v26 };
            fun.drawBLine(dxf, Line24, 0.12, contour);
            Vector2[] Line25 = { v24, v26 };
            fun.drawBLine(dxf, Line25, 0.12, contour);
            Vector2[] Line26 = { v25, v27 };
            fun.drawBLine(dxf, Line26, 0.12, contour);
            Vector2[] Line27 = { v29, v27 };
            fun.drawBLine(dxf, Line27, 0.12, contour);
            Vector2[] Line28 = { v29, v28 };
            fun.drawBLine(dxf, Line28, 0.12, contour);
            Vector2[] Line29 = { v30, v31 };
            fun.drawBLine(dxf, Line29, 0.12, contour);
            Vector2[] Line30 = { v32, v33 };
            fun.drawBLine(dxf, Line30, 0.12, contour);
            Vector2[] Line31 = { v31, v34 };
            fun.drawBLine(dxf, Line31, 0.12, contour);
            Vector2[] Line32 = { v35, v34 };
            fun.drawBLine(dxf, Line32, 0.12, contour);
            Vector2[] Line33 = { v36, v33 };
            fun.drawBLine(dxf, Line33, 0.12, contour);
            Vector2[] Line34 = { v36, v37 };
            fun.drawBLine(dxf, Line34, 0.12, contour);
            Vector2[] Line35 = { v38, v39 };
            fun.drawBLine(dxf, Line35, 0.12, contour);
            Vector2[] Line36 = { v40, v41 };
            fun.drawBLine(dxf, Line36, 0.12, contour);
            Vector2[] Line37 = { v39, v41 };
            fun.drawBLine(dxf, Line37, 0.12, contour);
            Vector2[] Line38 = { v39, v42 };
            fun.drawBLine(dxf, Line38, 0.12, contour);
            Vector2[] Line39 = { v43, v41 };
            fun.drawBLine(dxf, Line39, 0.12, contour);
            Vector2[] Line40 = { v43, v42 };
            fun.drawBLine(dxf, Line40, 0.12, contour);
            LwPolyline poly1 = new LwPolyline();
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v44, 0, f * 3)));
            poly1.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v44, Math.PI, f * 3)));
            poly1.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v44, 0, f * 3)));
            fun.PolyFill(dxf, poly1, 0.06, skdimensioning);
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v1.X - f * 2.6, v1.Y - f * 4), new Vector2(v1.X + r1 * 2 + r, v1.Y - f * 4) }, 0.08,centre, Linetype.Center);
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 1;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 1.8;
            double offset = 6;
            LinearDimension dim1 = new LinearDimension(new Line(v18, v28), offset * 2, 360, dimensionStyle);
            dim1.UserText = "a ";
            dxf.AddEntity(dim1);
            //Vector2 vstart = new Vector2(0, 0);
            //Vector2 vcen = new Vector2(50, 50);
            //Vector2 vend = new Vector2(170, 0);
            //Arc arc6 = fun.DrawArc(vstart, vcen, vend);

            //RadialDimension dimrad2 = new RadialDimension(arc6, 10, offset, dimensionStyle);//DimensionStyle.Default);
            //dimrad2.UserText = "1";
            //dxf.AddEntity(dimrad2);
            LwPolyline poly2 = new LwPolyline();
            poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v47, 0, f * 2)));
            poly2.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v47, Math.PI, f * 2)));
            poly2.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v47, 0, f * 2)));
            fun.PolyFill(dxf, poly2, 0.06, skdimensioning);
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint2(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double r = 13.5;
            double r1 = 30;
            double f = 1;
            double pi = Math.PI;
            double par = 28 * pi / 180;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + r * 1.3);
            Vector2 v3 = new Vector2(v2.X + r / 2.8, v2.Y);
            Vector2 v4 = new Vector2(v3.X + f / 2, v3.Y - f);
            Vector2 v5 = new Vector2(v4.X, v4.Y - f);
            Vector2 v6 = new Vector2(v5.X + f * 1.5, v5.Y);
            Vector2 v7 = new Vector2(v6.X, v6.Y + f);
            Vector2 v8 = new Vector2(v7.X + f / 2, v7.Y + f);
            Vector2 v9 = new Vector2(v8.X + f * 2, v8.Y);
            Vector2 v10 = new Vector2(v9.X, v9.Y - f * 5.6);
            Vector2 v11 = new Vector2(v10.X + f, v10.Y - f);
            Vector2 v12 = new Vector2(v11.X + r * 1.5, v11.Y);
            Vector2 v13 = new Vector2(v12.X + f / 2, v12.Y - f / 2);
            Vector2 v14 = new Vector2(v13.X + f / 2, v13.Y + f / 2);
            Vector2 v15 = new Vector2(v14.X + f * 6, v14.Y);
            Vector2 v16 = new Vector2(v15.X, v15.Y - f / 2);
            Vector2 v17 = new Vector2(v16.X + f * 6, v16.Y);
            Vector2 v18 = new Vector2(v17.X + f / 3, v17.Y + f / 3);
            Vector2 v19 = new Vector2(v18.X + f * 4, v18.Y);
            Vector2 v20 = new Vector2(v19.X + f, v19.Y + f / 3 / Math.Tan(par));
            Vector2 v21 = new Vector2(v20.X + f + f * 3 / 5, v20.Y + f * 3);
            Vector2 v22 = new Vector2(v21.X + f, v21.Y + f / 3 / Math.Tan(par));
            Vector2 v23 = new Vector2(v22.X + f * 2, v22.Y);
            Vector2 v24 = new Vector2(v23.X + f * 3, v23.Y - f * 1.6);
            Vector2 v25 = new Vector2(v24.X - f - f * 4 / 5, v24.Y - f * 3 - f * 7 / 10);
            Vector2 v26 = new Vector2(v25.X, v1.Y);
            Vector2 v27 = new Vector2(v25.X, v25.Y - f / 6);
            Vector2 v28 = new Vector2(v27.X + f / 2, v27.Y);
            Vector2 v29 = new Vector2(v27.X - f / 2, v27.Y);
            Vector2 v30 = new Vector2(v29.X - f * 3, v29.Y + f * 1.5);
            Vector2 v31 = new Vector2(v30.X - f / 6, v30.Y + f / 1.1);
            Vector2 v32 = new Vector2(v31.X + f * 1.5, v31.Y + f * 2.6 + f / 2);
            Vector2 v33 = new Vector2(v32.X + f, v32.Y + f / 1.6);
            Vector2 v34 = new Vector2(v33.X + f * 3.2, v33.Y - f - f / 1.5);
            Vector2 v35 = new Vector2(v34.X + f / 4, v34.Y - f / 1.3);
            // 线段
            //主视图
            Vector2[] Line1 = { v1, v2 };
            fun.drawBLine(dxf, Line1, 0.12, contour);
            Vector2[] Line2 = { v3, v2 };
            fun.drawBLine(dxf, Line2, 0.12, contour);
            Vector2[] Line3 = { v3, v4 };
            fun.drawBLine(dxf, Line3, 0.12, contour);
            Vector2[] Line4 = { v5, v4 };
            fun.drawBLine(dxf, Line4, 0.12, contour);
            Vector2[] Line5 = { v5, v6 };
            fun.drawBLine(dxf, Line5, 0.12, contour);
            Vector2[] Line6 = { v7, v6 };
            fun.drawBLine(dxf, Line6, 0.12, contour);
            Vector2[] Line7 = { v7, v8 };
            fun.drawBLine(dxf, Line7, 0.12, contour);
            Vector2[] Line8 = { v9, v8 };
            fun.drawBLine(dxf, Line8, 0.12, contour);
            Vector2[] Line9 = { v9, v10 };
            fun.drawBLine(dxf, Line9, 0.12, contour);
            Vector2[] Line10 = { v11, v10 };
            fun.drawBLine(dxf, Line10, 0.12, contour);
            Vector2[] Line11 = { v11, v12 };
            fun.drawBLine(dxf, Line11, 0.12, contour);
            Vector2[] Line12 = { v13, v12 };
            fun.drawBLine(dxf, Line12, 0.12, contour);
            Vector2[] Line13 = { v13, v14 };
            fun.drawBLine(dxf, Line13, 0.12, contour);
            Vector2[] Line14 = { v15, v14 };
            fun.drawBLine(dxf, Line14, 0.12, contour);
            Vector2[] Line15 = { v15, v16 };
            fun.drawBLine(dxf, Line15, 0.12, contour);
            Vector2[] Line16 = { v17, v16 };
            fun.drawBLine(dxf, Line16, 0.12, contour);
            Vector2[] Line17 = { v17, v18 };
            fun.drawBLine(dxf, Line17, 0.12, contour);
            Vector2[] Line18 = { v19, v18 };
            fun.drawBLine(dxf, Line18, 0.12, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v19));
            Arc1.Vertexes.Add(new LwPolylineVertex(v20));
            Arc1.Vertexes[0].Bulge = f / 3 * Math.Tan(par / 1.3) / Math.Sin(par);
            fun.PolyFill(dxf, Arc1, 0.12, contour);
            Vector2[] Line19 = { v20, v21 };
            fun.drawBLine(dxf, Line19, 0.12, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v21));
            Arc2.Vertexes.Add(new LwPolylineVertex(v22));
            Arc2.Vertexes[0].Bulge = -f / 3 * Math.Tan(par / 1.3) / Math.Sin(par);
            fun.PolyFill(dxf, Arc2, 0.12, contour);
            Vector2[] Line20 = { v22, v23 };
            fun.drawBLine(dxf, Line20, 0.12, contour);
            Vector2[] Line21 = { v24, v23 };
            fun.drawBLine(dxf, Line21, 0.12, contour);
            Vector2[] Line22 = { v24, v25 };
            fun.drawBLine(dxf, Line22, 0.12, contour);
            Vector2[] Line23 = { v26, v25 };
            fun.drawBLine(dxf, Line23, 0.12, contour);
            Vector2[] Line24 = { v26, v1 };
            fun.drawBLine(dxf, Line24, 0.12, contour);
            Vector2[] Line25 = { v28, v27 };
            fun.drawBLine(dxf, Line25, 0.12, contour);
            Vector2[] Line26 = { v29, v27 };
            fun.drawBLine(dxf, Line26, 0.12, contour);
            Vector2[] Line27 = { v29, v30 };
            fun.drawBLine(dxf, Line27, 0.12, contour);
            Vector2[] Line28 = { v31, v30 };
            fun.drawBLine(dxf, Line28, 0.12, contour);
            Vector2[] Line29 = { v32, v31 };
            fun.drawBLine(dxf, Line29, 0.12, contour);
            Vector2[] Line30 = { v32, v33 };
            fun.drawBLine(dxf, Line30, 0.12, contour);
            Vector2[] Line31 = { v34, v33 };
            fun.drawBLine(dxf, Line31, 0.12, contour);
            Vector2[] Line32 = { v34, v35 };
            fun.drawBLine(dxf, Line32, 0.12, contour);
            Vector2[] Line33 = { v28, v35 };
            fun.drawBLine(dxf, Line33, 0.12, contour);
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }

        //
        public static void Matingpoint3(Dictionary<string, Object> data)     //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double r = 13.5;
            double r1 = 30;
            double f = 1;
            double pi = Math.PI;
            double par = 28 * pi / 180;
            string path = Convert.ToString(data["path"]);
            //主视图
            //图三
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v225 = new Vector2(v1.X + r1, v1.Y);
            Vector2 v226 = new Vector2(v225.X, v225.Y - r - r / 1.3);
            Vector2 v227 = new Vector2(v225.X, v225.Y + r + r / 1.3);
            //
            Vector2 v228 = new Vector2(v226.X + r, v226.Y);
            Vector2 v229 = new Vector2(v227.X + r, v227.Y);
            //虚线前端口
            Vector2 v230 = new Vector2(v229.X + f * 2, v229.Y + f);
            Vector2 v231 = new Vector2(v228.X + f * 2, v228.Y - f);
            //半段虚线
            Vector2 v232 = new Vector2(v226.X + r / 2, v226.Y);
            Vector2 v233 = new Vector2(v226.X + r / 2, v226.Y + (r + r / 1.3) / 2);
            Vector2 v234 = new Vector2(v227.X + r / 2, v227.Y);
            Vector2 v235 = new Vector2(v227.X + r / 2, v227.Y - (r + r / 1.3) / 2);
            //斜边
            Vector2 v236 = new Vector2(v230.X + r + f, v230.Y + f * 6);
            //
            Vector2 v237 = new Vector2(v231.X + r + f, v231.Y - f * 6);
            //
            Vector2 v238 = new Vector2(v236.X + f * 3, v236.Y + f / 3.8);
            Vector2 v239 = new Vector2(v237.X + f * 3, v237.Y - f / 3.8);
            //下半部得横向
            Vector2 v240 = new Vector2(v238.X + f * 6, v238.Y - f * 2);
            Vector2 v241 = new Vector2(v237.X + f * 6, v237.Y);
            //
            Vector2 v242 = new Vector2(v236.X + f * 5, v236.Y + f * 1.6);
            Vector2 v243 = new Vector2(v242.X + f * 1.6, v242.Y + f / 4.6);
            Vector2 v244 = new Vector2(v243.X + f, v243.Y);
            //
            Vector2 v245 = new Vector2(v244.X - f * 2.6, v244.Y - f * 2.2);
            //
            Vector2 v246 = new Vector2(v244.X + f * 0.5, v244.Y + f * 0.2);
            Vector2 v247 = new Vector2(v246.X + f * 1.5, v246.Y - f * 1.42);
            Vector2 v248 = new Vector2(v247.X + f * 0.3, v247.Y - f * 0.5);
            Vector2 v249 = new Vector2(v248.X - f * 0.9, v248.Y - f * 1.8);
            //
            Vector2 v250 = new Vector2(v249.X, v249.Y - f);
            Vector2 v251 = new Vector2(v248.X, v248.Y - r1 * 2);
            //
            Vector2 v252 = new Vector2(v250.X + f * 4 / 5, v250.Y - f - f / 5);
            //
            Vector2 v253 = new Vector2(v238.X + f * 2 + (f * 2), v238.Y - (f * 2) + f / 1.5);
            Vector2 v254 = new Vector2(v238.X + f * 2 + (f * 2) * 1.5, v238.Y - (f * 2) + f / 3);
            //
            Vector2 v255 = new Vector2(v254.X, v254.Y - r / 1.3);
            //
            Vector2 v256 = new Vector2(v246.X - r + f / 2, v246.Y + r - f * 2);
            Vector2 v257 = new Vector2(v248.X, v248.Y + r + f * 6);
            //
            Vector2 v258 = new Vector2(v255.X + f / 3, v255.Y);
            Vector2 v259 = new Vector2(v258.X + f + f / 2, v258.Y - f);
            Vector2 v260 = new Vector2(v255.X - f / 3, v255.Y);
            Vector2 v261 = new Vector2(v260.X + f / 5, v260.Y - f * 7 / 10);
            Vector2 v262 = new Vector2(v261.X + f * 2, v261.Y - f - f / 2);
            Vector2 v263 = new Vector2(v260.X - f * 2 - f * 3 / 5, v260.Y - f * 2 - f / 5);
            Vector2 v264 = new Vector2(v263.X - f / 5, v263.Y - f);
            Vector2 v265 = new Vector2(v264.X + f * 3, v264.Y - f * 2 - f * 7 / 10);
            Vector2 v266 = new Vector2(v265.X + f * 2, v265.Y + f * 2);
            //前端圆弧
            Vector2 v267 = new Vector2(v260.X - f * 2 - f * 3 / 8, v260.Y - f * 2);
            Vector2 v268 = new Vector2(v267.X - f * 5, v267.Y + f * 1.8);
            Vector2 v269 = new Vector2(v268.X - f * 3.9, v268.Y - f * 3 - f);
            Vector2 v270 = new Vector2(v269.X + f * 3.6, v269.Y - r / 1.6);
            Vector2 v271 = new Vector2(v270.X + f * 6.6, v270.Y - f * 9);
            //圆心
            Vector2 v272 = new Vector2(v260.X, v260.Y - f * 3);
            Vector2 v273 = new Vector2(v272.X - f * 4.6, v272.Y - f * 5);
            //新图下方
            Vector2 v274 = new Vector2(v266.X - f - f / 2, v266.Y - f * 2.6);
            Vector2 v275 = new Vector2(v274.X + f * 6 / 10, v274.Y - f * 3 / 5);
            Vector2 v276 = new Vector2(v275.X + f * 9 / 10, v275.Y + f + f * 6 / 10);
            //下圆链接
            Vector2 v277 = new Vector2(v265.X + f / 2, v265.Y - f * 1.5);
            Vector2 v278 = new Vector2(v277.X + f + f / 2, v277.Y - r + f * 2);
            //虚线后
            Vector2 v279 = new Vector2(v277.X, v277.Y + f / 9);
            Vector2 v280 = new Vector2(v279.X + f * 1.5, v279.Y);
            Vector2 v281 = new Vector2(v279.X - f * 2.6, v279.Y);
            //中心线下面
            Vector2 v282 = new Vector2(v271.X + f * 1.5, v271.Y);
            Vector2 v283 = new Vector2(v282.X, v282.Y + f + f / 2);
            Vector2 v284 = new Vector2(v283.X - f / 2, v283.Y + f * 3 / 5);
            Vector2 v285 = new Vector2(v284.X + f / 5, v284.Y + f * 4 / 5);
            Vector2 v286 = new Vector2(v285.X + f * 2.07, v285.Y - f / 2);
            Vector2 v287 = new Vector2(v282.X, v282.Y - f * 3);
            Vector2 v288 = new Vector2(v287.X + f * 1.8, v287.Y);
            Vector2 v289 = new Vector2(v282.X, v282.Y - f * 2);
            Vector2 v290 = new Vector2(v289.X + f * 1.8, v289.Y);
            Vector2 v291 = new Vector2(v271.X, v271.Y - f * 8);
            Vector2 v292 = new Vector2(v271.X + f * 3.3, v291.Y);
            Vector2 v293 = new Vector2(v271.X + f * 1.2, v292.Y);
            //待修改
            Vector2 v294 = new Vector2(v293.X - f * 2, v293.Y - f * 2 - f * 2);
            Vector2 v295 = new Vector2(v293.X - f * 0.6, v293.Y - f * 2.5 - f * 1.5);
            Vector2 v296 = new Vector2(v295.X + f * 2.66, v295.Y);
            Vector2 v297 = new Vector2(v295.X + f * 2.66, v295.Y - f * 2);
            //待修改
            Vector2 v298 = new Vector2(v294.X + f * 4, v294.Y - r + f * 3);
            Vector2 v299 = new Vector2(v295.X - f * 1.4, v295.Y);
            //竖线点
            Vector2 v300 = new Vector2(v294.X - f * 9.5, v294.Y + f * 4.7);
            //
            Vector2 v301 = new Vector2(v300.X - f * 3, v300.Y - f * 3.4);
            //
            Vector2 v302 = new Vector2(v301.X + f * 5.8, v301.Y - f * 11.8);
            //竖线1
            Vector2 v303 = new Vector2(v302.X, v302.Y - f * 5.4);
            //
            Vector2 v304 = new Vector2(v302.X + f * 6.75, v302.Y - f * 2.88);
            //竖线2
            Vector2 v305 = new Vector2(v302.X + f * 2, v302.Y - f * 0.9);
            Vector2 v306 = new Vector2(v305.X, v305.Y - f * 4.9);
            //
            Vector2 v307 = new Vector2(v304.X, v304.Y - f * 2.9);
            Vector2 v308 = new Vector2(v304.X + f * 2.46, v304.Y + f * 0.9);
            //竖线3组
            Vector2 v309 = new Vector2(v302.X, v300.Y - f * 1.3);
            Vector2 v310 = new Vector2(v302.X, v309.Y + r + f * 6);
            //
            Vector2 v311 = new Vector2(v305.X, v310.Y - f * 3.68);
            Vector2 v312 = new Vector2(v311.X, v311.Y - r - f * 3.29);
            //竖线4组
            Vector2 v313 = new Vector2(v302.X, v309.Y + r + f * 6 + f * 10.78);
            Vector2 v314 = new Vector2(v302.X, v313.Y + f * 11.38);
            //
            Vector2 v315 = new Vector2(v305.X, v310.Y + f * 10.2);
            Vector2 v316 = new Vector2(v315.X, v315.Y + f * 12.6);
            //虚线
            Vector2 v317 = new Vector2(v233.X + f * 10, v233.Y);
            Vector2 v318 = new Vector2(v317.X, v235.Y);
            //
            Vector2 v319 = new Vector2(v317.X + f, v318.Y);
            Vector2 v320 = new Vector2(v317.X + f, v317.Y);
            //
            Vector2 v321 = new Vector2(v319.X, v319.Y - f * 5);
            Vector2 v322 = new Vector2(v319.X + r + f * 4.5, v321.Y);
            //
            Vector2 v323 = new Vector2(v320.X, v320.Y + f * 6);
            Vector2 v324 = new Vector2(v319.X + r + f * 4.5, v323.Y);
            //
            Vector2 v325 = new Vector2(v322.X, v322.Y + f * 4.6);
            Vector2 v326 = new Vector2(v324.X, v324.Y - f * 3.6);
            Vector2 v327 = new Vector2(v324.X + f * 4.1, v324.Y - f * 3.6);
            // 线段
            //主视图
            //图三
            Vector2[] Line199 = { v225, v226 };
            fun.drawBLine(dxf, Line199, 0.08, contour);
            Vector2[] Line200 = { v225, v227 };
            fun.drawBLine(dxf, Line200, 0.08, contour);
            Vector2[] Line201 = { v226, v228 };
            fun.drawBLine(dxf, Line201, 0.08, contour);
            Vector2[] Line202 = { v227, v229 };
            fun.drawBLine(dxf, Line202, 0.08, contour);
            Vector2[] Line203 = { v228, v229 };
            fun.drawBLine(dxf, Line203, 0.08, contour);
            Vector2[] Line204 = { v230, v229 };
            fun.drawBLine(dxf, Line204, 0.08, contour);
            //虚线前
            Vector2[] Line205 = { v231, v228 };
            fun.drawBLine(dxf, Line205, 0.08, contour);
            Vector2[] Line206 = { v231, v230 };
            fun.drawBLine(dxf, Line206, 0.08, contour);
            //
            Vector2[] Line207 = { v232, v233 };
            fun.drawPlinetype(dxf, Line207, 0.08, refin, Linetype.Dashed);
            Vector2[] Line208 = { v234, v235 };
            fun.drawPlinetype(dxf, Line208, 0.08, refin, Linetype.Dashed);
            //
            Vector2[] Line209 = { v230, v236 };
            fun.drawBLine(dxf, Line209, 0.08, contour);
            Vector2[] Line210 = { v231, v237 };
            fun.drawBLine(dxf, Line210, 0.08, contour);
            //
            LwPolyline Arc16 = new LwPolyline();
            Arc16.Vertexes.Add(new LwPolylineVertex(v236));
            Arc16.Vertexes.Add(new LwPolylineVertex(v238));
            Arc16.Vertexes[0].Bulge = -f / 8 * Math.Tan(par) / Math.Sin(par);
            fun.PolyFill(dxf, Arc16, 0.08, contour);
            //LwPolyline Arc17 = new LwPolyline();
            //Arc17.Vertexes.Add(new LwPolylineVertex(v237));
            //Arc17.Vertexes.Add(new LwPolylineVertex(v239));
            //Arc17.Vertexes[0].Bulge = f / 6 * Math.Tan(par) / Math.Sin(par);
            //fun.PolyFill(dxf, Arc17, 0.08, contour);
            Vector2[] Line211 = { v240, v238 };
            fun.drawBLine(dxf, Line211, 0.08, contour);
            Vector2[] Line212 = { v237, v241 };
            fun.drawBLine(dxf, Line212, 0.08, contour);
            Vector2[] Line213 = { v236, v242 };
            fun.drawBLine(dxf, Line213, 0.08, contour);
            LwPolyline Arc17 = new LwPolyline();
            Arc17.Vertexes.Add(new LwPolylineVertex(v242));
            Arc17.Vertexes.Add(new LwPolylineVertex(v243));
            Arc17.Vertexes[0].Bulge = -f / 12 * Math.Tan(par) / Math.Sin(par);
            fun.PolyFill(dxf, Arc17, 0.08, contour);
            Vector2[] Line214 = { v243, v244 };
            fun.drawBLine(dxf, Line214, 0.08, contour);
            Vector2[] Line215 = { v245, v244 };
            fun.drawBLine(dxf, Line215, 0.08, contour);
            Vector2[] Line216 = { v244, v246 };
            fun.drawBLine(dxf, Line216, 0.08, contour);
            Vector2[] Line217 = { v247, v246 };
            fun.drawBLine(dxf, Line217, 0.08, contour);
            Vector2[] Line218 = { v247, v248 };
            fun.drawBLine(dxf, Line218, 0.08, contour);
            Vector2[] Line219 = { v249, v248 };
            fun.drawBLine(dxf, Line219, 0.08, contour);
            Vector2[] Line220 = { v249, v250 };
            fun.drawBLine(dxf, Line220, 0.08, contour);
            Vector2[] Line221 = { v248, v251 };
            fun.drawBLine(dxf, Line221, 0.08, contour);
            Vector2[] Line222 = { v241, v251 };
            fun.drawBLine(dxf, Line222, 0.08, contour);
            Vector2[] Line223 = { v250, v252 };
            fun.drawBLine(dxf, Line223, 0.08, contour);
            //LwPolyline Arc18 = new LwPolyline();
            //Arc18.Vertexes.Add(new LwPolylineVertex(v253));
            //Arc18.Vertexes.Add(new LwPolylineVertex(v254));
            //Arc18.Vertexes[0].Bulge = -f * Math.Tan(par) / Math.Sin(par);
            //fun.PolyFill(dxf, Arc18, 0.08, contour);
            Vector2[] Line224 = { v254, v255 };
            fun.drawBLine(dxf, Line224, 0.08, contour);
            Vector2[] Line225 = { v256, v246 };
            fun.drawBLine(dxf, Line225, 0.08, skdimensioning);
            Vector2[] Line226 = { v257, v248 };
            fun.drawBLine(dxf, Line226, 0.08, skdimensioning);
            //中间
            Vector2[] Line227 = { v258, v255 };
            fun.drawBLine(dxf, Line227, 0.08, contour);
            Vector2[] Line228 = { v258, v259 };
            fun.drawBLine(dxf, Line228, 0.08, contour);
            Vector2[] Line229 = { v260, v255 };
            fun.drawBLine(dxf, Line229, 0.08, contour);
            Vector2[] Line230 = { v260, v261 };
            fun.drawBLine(dxf, Line230, 0.08, contour);
            Vector2[] Line231 = { v258, v261 };
            fun.drawBLine(dxf, Line231, 0.08, contour);
            Vector2[] Line232 = { v262, v261 };
            fun.drawBLine(dxf, Line232, 0.08, contour);
            Vector2[] Line233 = { v263, v260 };
            fun.drawBLine(dxf, Line233, 0.08, contour);
            Vector2[] Line234 = { v263, v264 };
            fun.drawBLine(dxf, Line234, 0.08, contour);
            Vector2[] Line235 = { v261, v264 };
            fun.drawBLine(dxf, Line235, 0.08, contour);
            Vector2[] Line236 = { v265, v264 };
            fun.drawBLine(dxf, Line236, 0.08, contour);
            Vector2[] Line237 = { v266, v265 };
            fun.drawBLine(dxf, Line237, 0.08, contour);
            Vector2[] Line238 = { v267, v268 };
            fun.drawBLine(dxf, Line238, 0.08, contour);
            LwPolyline Arc19 = new LwPolyline();
            Arc19.Vertexes.Add(new LwPolylineVertex(v268));
            Arc19.Vertexes.Add(new LwPolylineVertex(v269));
            Arc19.Vertexes[0].Bulge = f / 1.6 * Math.Tan(par) / Math.Sin(par);
            fun.PolyFill(dxf, Arc19, 0.08, contour);
            Vector2[] Line239 = { v269, v270 };
            fun.drawBLine(dxf, Line239, 0.08, contour);
            Vector2[] Line240 = { v271, v270 };
            fun.drawBLine(dxf, Line240, 0.08, contour);
            //LwPolyline poly3 = new LwPolyline();
            //poly3.Vertexes.Add(new LwPolylineVertex(fun.Polar(v272, 0, f / 1.6)));
            //poly3.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly3.Vertexes.Add(new LwPolylineVertex(fun.Polar(v272, Math.PI, f / 1.6)));
            //poly3.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly3.Vertexes.Add(new LwPolylineVertex(fun.Polar(v272, 0, f / 1.6)));
            //fun.PolyFill(dxf, poly3, 0.08, contour);
            LwPolyline poly4 = new LwPolyline();
            poly4.Vertexes.Add(new LwPolylineVertex(fun.Polar(v273, 0, f / 1.3)));
            poly4.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly4.Vertexes.Add(new LwPolylineVertex(fun.Polar(v273, Math.PI, f / 1.3)));
            poly4.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly4.Vertexes.Add(new LwPolylineVertex(fun.Polar(v273, 0, f / 1.3)));
            fun.PolyFill(dxf, poly4, 0.08, contour);
            Vector2[] Line241 = { v266, v274 };
            fun.drawBLine(dxf, Line241, 0.08, contour);
            Vector2[] Line242 = { v275, v274 };
            fun.drawBLine(dxf, Line242, 0.08, contour);
            Vector2[] Line243 = { v275, v276 };
            fun.drawBLine(dxf, Line243, 0.08, contour);
            LwPolyline Arc20 = new LwPolyline();
            Arc20.Vertexes.Add(new LwPolylineVertex(v275));
            Arc20.Vertexes.Add(new LwPolylineVertex(v274));
            Arc20.Vertexes[0].Bulge = -f / 1.2 * Math.Tan(par) / Math.Sin(par);
            fun.PolyFill(dxf, Arc20, 0.08, contour);
            LwPolyline Arc21 = new LwPolyline();
            Arc21.Vertexes.Add(new LwPolylineVertex(v274));
            Arc21.Vertexes.Add(new LwPolylineVertex(v277));
            Arc21.Vertexes[0].Bulge = f / 8 * Math.Tan(par) / Math.Sin(par);
            fun.PolyFill(dxf, Arc21, 0.08, contour);
            Vector2[] Line244 = { v278, v277 };
            fun.drawBLine(dxf, Line244, 0.08, contour);
            Vector2[] Line245 = { v279, v280 };
            fun.drawBLine(dxf, Line245, 0.06, contour);
            Vector2[] Line246 = { v279, v281 };
            fun.drawBLine(dxf, Line246, 0.06, contour);
            Vector2[] Line247 = { v282, v271 };
            fun.drawBLine(dxf, Line247, 0.08, contour);
            Vector2[] Line248 = { v282, v283 };
            fun.drawBLine(dxf, Line248, 0.08, contour);
            Vector2[] Line249 = { v284, v283 };
            fun.drawBLine(dxf, Line249, 0.08, contour);
            Vector2[] Line250 = { v284, v285 };
            fun.drawBLine(dxf, Line250, 0.08, contour);
            Vector2[] Line251 = { v286, v285 };
            fun.drawBLine(dxf, Line251, 0.08, contour);
            Vector2[] Line252 = { v282, v287 };
            fun.drawBLine(dxf, Line252, 0.08, contour);
            Vector2[] Line253 = { v288, v287 };
            fun.drawBLine(dxf, Line253, 0.08, contour);
            Vector2[] Line254 = { v289, v290 };
            fun.drawBLine(dxf, Line254, 0.08, contour);
            Vector2[] Line255 = { v271, v291 };
            fun.drawBLine(dxf, Line255, 0.08, contour);
            Vector2[] Line256 = { v292, v291 };
            fun.drawBLine(dxf, Line256, 0.08, contour);
            Vector2[] Line257 = { v293, v294 };
            fun.drawBLine(dxf, Line257, 0.08, contour);
            Vector2[] Line258 = { v293, v295 };
            fun.drawBLine(dxf, Line258, 0.08, contour);
            Vector2[] Line259 = { v296, v295 };
            fun.drawBLine(dxf, Line259, 0.08, contour);
            Vector2[] Line260 = { v297, v295 };
            fun.drawBLine(dxf, Line260, 0.08, contour);
            Vector2[] Line261 = { v299, v295 };
            fun.drawBLine(dxf, Line261, 0.08, contour);
            Vector2[] Line262 = { v294, v298 };
            fun.drawBLine(dxf, Line262, 0.08, contour);
            Vector2[] Line263 = { v300, v294 };
            fun.drawBLine(dxf, Line263, 0.08, contour);
            LwPolyline Arc22 = new LwPolyline();
            Arc22.Vertexes.Add(new LwPolylineVertex(v300));
            Arc22.Vertexes.Add(new LwPolylineVertex(v301));
            Arc22.Vertexes[0].Bulge = f / 1.5 * Math.Tan(par) / Math.Sin(par);
            fun.PolyFill(dxf, Arc22, 0.08, contour);
            Vector2[] Line264 = { v301, v302 };
            fun.drawBLine(dxf, Line264, 0.08, contour);
            Vector2[] Line265 = { v302, v303 };
            fun.drawBLine(dxf, Line265, 0.12, contour);
            Vector2[] Line266 = { v304, v302 };
            fun.drawBLine(dxf, Line266, 0.08, contour);
            Vector2[] Line267 = { v305, v306 };
            fun.drawBLine(dxf, Line267, 0.08, contour);
            Vector2[] Line268 = { v307, v304 };
            fun.drawBLine(dxf, Line268, 0.08, contour);
            LwPolyline Arc23 = new LwPolyline();
            Arc23.Vertexes.Add(new LwPolylineVertex(v298));
            Arc23.Vertexes.Add(new LwPolylineVertex(v251));
            Arc23.Vertexes[0].Bulge = f / 1.5 * Math.Tan(par) / Math.Sin(par);
            fun.PolyFill(dxf, Arc23, 0.08, contour);
            Vector2[] Line269 = { v308, v304 };
            fun.drawBLine(dxf, Line269, 0.08, contour);
            Vector2[] Line270 = { v309, v310 };
            fun.drawBLine(dxf, Line270, 0.12, contour);
            Vector2[] Line271 = { v311, v312 };
            fun.drawBLine(dxf, Line271, 0.08, contour);
            Vector2[] Line272 = { v313, v314 };
            fun.drawBLine(dxf, Line272, 0.12, contour);
            Vector2[] Line273 = { v315, v316 };
            fun.drawBLine(dxf, Line273, 0.08, contour);
            Vector2[] Line274 = { v317, v318 };
            fun.drawPlinetype(dxf, Line274, 0.08, refin, Linetype.Dashed);
            Vector2[] Line275 = { v319, v320 };
            fun.drawPlinetype(dxf, Line275, 0.08, refin, Linetype.Dashed);
            LwPolyline Arc24 = new LwPolyline();
            Arc24.Vertexes.Add(new LwPolylineVertex(v317));
            Arc24.Vertexes.Add(new LwPolylineVertex(v320));
            Arc24.Vertexes[0].Bulge = f / 1.5 * Math.Tan(par) / Math.Sin(par);
            fun.PolyFillandlinetype(dxf, Arc24, 0.08, refin, Linetype.Dashed);
            LwPolyline Arc25 = new LwPolyline();
            Arc25.Vertexes.Add(new LwPolylineVertex(v318));
            Arc25.Vertexes.Add(new LwPolylineVertex(v319));
            Arc25.Vertexes[0].Bulge = -f / 1.5 * Math.Tan(par) / Math.Sin(par);
            fun.PolyFillandlinetype(dxf, Arc25, 0.08, refin, Linetype.Dashed);
            Vector2[] Line276 = { v322, v321 };
            fun.drawPlinetype(dxf, Line276, 0.08,refin, Linetype.Dashed);
            Vector2[] Line277 = { v323, v324 };
            fun.drawPlinetype(dxf, Line277, 0.08,refin, Linetype.Dashed);
            Vector2[] Line278 = { v325, v322 };
            fun.drawPlinetype(dxf, Line278, 0.08,refin, Linetype.Dashed);
            Vector2[] Line279 = { v326, v324 };
            fun.drawPlinetype(dxf, Line279, 0.08,refin, Linetype.Dashed);
            Vector2[] Line280 = { v327, v326 };
            fun.drawBLine(dxf, Line280, 0.08, contour);
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 1;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 1.8;
            double offset = 6;
            LinearDimension dim6 = new LinearDimension(new Line(v226, v227), offset * 6, 90, dimensionStyle);
            dim6.UserText = "Φ62 ";
            dxf.AddEntity(dim6);
            LinearDimension dim7 = new LinearDimension(new Line(v241, v246), offset * 4, 270, dimensionStyle);
            dim7.UserText = "Φ92 ";
            dxf.AddEntity(dim7);
            LinearDimension dim8 = new LinearDimension(new Line(v248, v251), offset * 2, 270, dimensionStyle);
            dim8.UserText = "Φ80 ";
            dxf.AddEntity(dim8);
            LinearDimension dim9 = new LinearDimension(new Line(v227, v248), offset * 6, 0, dimensionStyle);
            dim9.UserText = "（50） ";
            dxf.AddEntity(dim9);
            LinearDimension dim10 = new LinearDimension(new Line(v246, v248), offset * 1.6, 0, dimensionStyle);
            dim10.UserText = "6 ";
            dxf.AddEntity(dim10);
            Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v246, v256), new Line(v248, v257), offset * 3, dimensionStyle);
            angdim1.UserText = "45°";
            dxf.AddEntity(angdim1);
            LinearDimension dim11 = new LinearDimension(new Line(v317, v318), offset * 6, 90, dimensionStyle);
            dim11.UserText = "Φ27H7 ";
            dxf.AddEntity(dim11);
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v225.X - f * 6, v225.Y), new Vector2(v225.X + f * 2 + r * 3, v225.Y) },0.08, centre, Linetype.Center);
            //
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint4(Dictionary<string, Object> data)     //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double r = 13.5;
            double r1 = 30;
            double f = 1;
            double pi = Math.PI;
            double par = 28 * pi / 180;
            string path = Convert.ToString(data["path"]);
            //主视图
            //图三
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v225 = new Vector2(v1.X + r1, v1.Y);
            Vector2 v226 = new Vector2(v225.X, v225.Y - r - r / 1.3);
            Vector2 v227 = new Vector2(v225.X, v225.Y + r + r / 1.3);
            //
            Vector2 v228 = new Vector2(v226.X + r, v226.Y);
            Vector2 v229 = new Vector2(v227.X + r, v227.Y);
            //虚线前端口
            Vector2 v230 = new Vector2(v229.X + f * 2, v229.Y + f);
            Vector2 v231 = new Vector2(v228.X + f * 2, v228.Y - f);
            //半段虚线
            Vector2 v232 = new Vector2(v226.X + r / 2, v226.Y);
            Vector2 v233 = new Vector2(v226.X + r / 2, v226.Y + (r + r / 1.3) / 2);
            Vector2 v234 = new Vector2(v227.X + r / 2, v227.Y);
            Vector2 v235 = new Vector2(v227.X + r / 2, v227.Y - (r + r / 1.3) / 2);
            //斜边
            Vector2 v236 = new Vector2(v230.X + r + f, v230.Y + f * 6);
            //
            Vector2 v237 = new Vector2(v231.X + r + f, v231.Y - f * 6);
            //
            Vector2 v238 = new Vector2(v236.X + f * 3, v236.Y + f / 3.8);
            Vector2 v239 = new Vector2(v237.X + f * 3, v237.Y - f / 3.8);
            //下半部得横向
            Vector2 v240 = new Vector2(v238.X + f * 6, v238.Y - f * 2);
            Vector2 v241 = new Vector2(v237.X + f * 6, v237.Y);
            //
            Vector2 v242 = new Vector2(v236.X + f * 5, v236.Y + f * 1.6);
            Vector2 v243 = new Vector2(v242.X + f * 1.6, v242.Y + f / 4.6);
            Vector2 v244 = new Vector2(v243.X + f, v243.Y);
            //
            Vector2 v245 = new Vector2(v244.X - f * 2.6, v244.Y - f * 2.2);
            //
            Vector2 v246 = new Vector2(v244.X + f * 0.5, v244.Y + f * 0.2);
            Vector2 v247 = new Vector2(v246.X + f * 1.5, v246.Y - f * 1.42);
            Vector2 v248 = new Vector2(v247.X + f * 0.3, v247.Y - f * 0.5);
            Vector2 v249 = new Vector2(v248.X - f * 0.9, v248.Y - f * 1.8);
            //
            Vector2 v250 = new Vector2(v249.X, v249.Y - f);
            Vector2 v251 = new Vector2(v248.X, v248.Y - r1 * 2);
            //
            Vector2 v252 = new Vector2(v250.X + f * 4 / 5, v250.Y - f - f / 5);
            //
            Vector2 v253 = new Vector2(v238.X + f * 2 + (f * 2), v238.Y - (f * 2) + f / 1.5);
            Vector2 v254 = new Vector2(v238.X + f * 2 + (f * 2) * 1.5, v238.Y - (f * 2) + f / 3);
            //
            Vector2 v255 = new Vector2(v254.X, v254.Y - r / 1.3);
            //
            Vector2 v256 = new Vector2(v246.X - r + f / 2, v246.Y + r - f * 2);
            Vector2 v257 = new Vector2(v248.X, v248.Y + r + f * 6);
            //
            Vector2 v258 = new Vector2(v255.X + f / 3, v255.Y);
            Vector2 v259 = new Vector2(v258.X + f + f / 2, v258.Y - f);
            Vector2 v260 = new Vector2(v255.X - f / 3, v255.Y);
            Vector2 v261 = new Vector2(v260.X + f / 5, v260.Y - f * 7 / 10);
            Vector2 v262 = new Vector2(v261.X + f * 2, v261.Y - f - f / 2);
            Vector2 v263 = new Vector2(v260.X - f * 2 - f * 3 / 5, v260.Y - f * 2 - f / 5);
            Vector2 v264 = new Vector2(v263.X - f / 5, v263.Y - f);
            Vector2 v265 = new Vector2(v264.X + f * 3, v264.Y - f * 2 - f * 7 / 10);
            Vector2 v266 = new Vector2(v265.X + f * 2, v265.Y + f * 2);
            //前端圆弧
            Vector2 v267 = new Vector2(v260.X - f * 2 - f * 3 / 8, v260.Y - f * 2);
            Vector2 v268 = new Vector2(v267.X - f * 5, v267.Y + f * 1.8);
            Vector2 v269 = new Vector2(v268.X - f * 3.9, v268.Y - f * 3 - f);
            Vector2 v270 = new Vector2(v269.X + f * 3.6, v269.Y - r / 1.6);
            Vector2 v271 = new Vector2(v270.X + f * 6.6, v270.Y - f * 9);
            //圆心
            Vector2 v272 = new Vector2(v260.X, v260.Y - f * 3);
            Vector2 v273 = new Vector2(v272.X - f * 4.6, v272.Y - f * 5);
            //新图下方
            Vector2 v274 = new Vector2(v266.X - f - f / 2, v266.Y - f * 2.6);
            Vector2 v275 = new Vector2(v274.X + f * 6 / 10, v274.Y - f * 3 / 5);
            Vector2 v276 = new Vector2(v275.X + f * 9 / 10, v275.Y + f + f * 6 / 10);
            //下圆链接
            Vector2 v277 = new Vector2(v265.X + f / 2, v265.Y - f * 1.5);
            Vector2 v278 = new Vector2(v277.X + f + f / 2, v277.Y - r + f * 2);
            //虚线后
            Vector2 v279 = new Vector2(v277.X, v277.Y + f / 9);
            Vector2 v280 = new Vector2(v279.X + f * 1.5, v279.Y);
            Vector2 v281 = new Vector2(v279.X - f * 2.6, v279.Y);
            //中心线下面
            Vector2 v282 = new Vector2(v271.X + f * 1.5, v271.Y);
            Vector2 v283 = new Vector2(v282.X, v282.Y + f + f / 2);
            Vector2 v284 = new Vector2(v283.X - f / 2, v283.Y + f * 3 / 5);
            Vector2 v285 = new Vector2(v284.X + f / 5, v284.Y + f * 4 / 5);
            Vector2 v286 = new Vector2(v285.X + f * 2.07, v285.Y - f / 2);
            Vector2 v287 = new Vector2(v282.X, v282.Y - f * 3);
            Vector2 v288 = new Vector2(v287.X + f * 1.8, v287.Y);
            Vector2 v289 = new Vector2(v282.X, v282.Y - f * 2);
            Vector2 v290 = new Vector2(v289.X + f * 1.8, v289.Y);
            Vector2 v291 = new Vector2(v271.X, v271.Y - f * 8);
            Vector2 v292 = new Vector2(v271.X + f * 3.3, v291.Y);
            Vector2 v293 = new Vector2(v271.X + f * 1.2, v292.Y);
            //待修改
            Vector2 v294 = new Vector2(v293.X - f * 2, v293.Y - f * 2 - f * 2);
            Vector2 v295 = new Vector2(v293.X - f * 0.6, v293.Y - f * 2.5 - f * 1.5);
            Vector2 v296 = new Vector2(v295.X + f * 2.66, v295.Y);
            Vector2 v297 = new Vector2(v295.X + f * 2.66, v295.Y - f * 2);
            //待修改
            Vector2 v298 = new Vector2(v294.X + f * 4, v294.Y - r + f * 3);
            Vector2 v299 = new Vector2(v295.X - f * 1.4, v295.Y);
            //竖线点
            Vector2 v300 = new Vector2(v294.X - f * 9.5, v294.Y + f * 4.7);
            //
            Vector2 v301 = new Vector2(v300.X - f * 3, v300.Y - f * 3.4);
            //
            Vector2 v302 = new Vector2(v301.X + f * 5.8, v301.Y - f * 11.8);
            //竖线1
            Vector2 v303 = new Vector2(v302.X, v302.Y - f * 5.4);
            //
            Vector2 v304 = new Vector2(v302.X + f * 6.75, v302.Y - f * 2.88);
            //竖线2
            Vector2 v305 = new Vector2(v302.X + f * 2, v302.Y - f * 0.9);
            Vector2 v306 = new Vector2(v305.X, v305.Y - f * 4.9);
            //
            Vector2 v307 = new Vector2(v304.X, v304.Y - f * 2.9);
            Vector2 v308 = new Vector2(v304.X + f * 2.46, v304.Y + f * 0.9);
            //竖线3组
            Vector2 v309 = new Vector2(v302.X, v300.Y - f * 1.3);
            Vector2 v310 = new Vector2(v302.X, v309.Y + r + f * 6);
            //
            Vector2 v311 = new Vector2(v305.X, v310.Y - f * 3.68);
            Vector2 v312 = new Vector2(v311.X, v311.Y - r - f * 3.29);
            //竖线4组
            Vector2 v313 = new Vector2(v302.X, v309.Y + r + f * 6 + f * 10.78);
            Vector2 v314 = new Vector2(v302.X, v313.Y + f * 11.38);
            //
            Vector2 v315 = new Vector2(v305.X, v310.Y + f * 10.2);
            Vector2 v316 = new Vector2(v315.X, v315.Y + f * 12.6);
            //虚线
            Vector2 v317 = new Vector2(v233.X + f * 10, v233.Y);
            Vector2 v318 = new Vector2(v317.X, v235.Y);
            //
            Vector2 v319 = new Vector2(v317.X + f, v318.Y);
            Vector2 v320 = new Vector2(v317.X + f, v317.Y);
            //
            Vector2 v321 = new Vector2(v319.X, v319.Y - f * 5);
            Vector2 v322 = new Vector2(v319.X + r + f * 4.5, v321.Y);
            //
            Vector2 v323 = new Vector2(v320.X, v320.Y + f * 6);
            Vector2 v324 = new Vector2(v319.X + r + f * 4.5, v323.Y);
            //
            Vector2 v325 = new Vector2(v322.X, v322.Y + f * 4.6);
            Vector2 v326 = new Vector2(v324.X, v324.Y - f * 3.6);
            Vector2 v327 = new Vector2(v324.X + f * 4.1, v324.Y - f * 3.6);
            // 线段
            //主视图
            //图三
            Vector2[] Line199 = { v225, v226 };
            fun.drawBLine(dxf, Line199, 0.08, contour);
            Vector2[] Line200 = { v225, v227 };
            fun.drawBLine(dxf, Line200, 0.08, contour);
            Vector2[] Line201 = { v226, v228 };
            fun.drawBLine(dxf, Line201, 0.08, contour);
            Vector2[] Line202 = { v227, v229 };
            fun.drawBLine(dxf, Line202, 0.08, contour);
            Vector2[] Line203 = { v228, v229 };
            fun.drawBLine(dxf, Line203, 0.08, contour);
            Vector2[] Line204 = { v230, v229 };
            fun.drawBLine(dxf, Line204, 0.08, contour);
            //虚线前
            Vector2[] Line205 = { v231, v228 };
            fun.drawBLine(dxf, Line205, 0.08, contour);
            Vector2[] Line206 = { v231, v230 };
            fun.drawBLine(dxf, Line206, 0.08, contour);
            //
            //Vector2[] Line207 = { v232, v233 };
            //fun.drawPlinetype(dxf, Line207, refin, Linetype.Dashed);
            //Vector2[] Line208 = { v234, v235 };
            //fun.drawPlinetype(dxf, Line208, refin, Linetype.Dashed);
            //
            Vector2[] Line209 = { v230, v236 };
            fun.drawBLine(dxf, Line209, 0.08, contour);
            Vector2[] Line210 = { v231, v237 };
            fun.drawBLine(dxf, Line210, 0.08, contour);
            //
            LwPolyline Arc16 = new LwPolyline();
            Arc16.Vertexes.Add(new LwPolylineVertex(v236));
            Arc16.Vertexes.Add(new LwPolylineVertex(v238));
            Arc16.Vertexes[0].Bulge = -f / 8 * Math.Tan(par) / Math.Sin(par);
            fun.PolyFill(dxf, Arc16, 0.08, contour);
            //LwPolyline Arc17 = new LwPolyline();
            //Arc17.Vertexes.Add(new LwPolylineVertex(v237));
            //Arc17.Vertexes.Add(new LwPolylineVertex(v239));
            //Arc17.Vertexes[0].Bulge = f / 6 * Math.Tan(par) / Math.Sin(par);
            //fun.PolyFill(dxf, Arc17, 0.08, contour);
            Vector2[] Line211 = { v240, v238 };
            fun.drawBLine(dxf, Line211, 0.08, contour);
            Vector2[] Line212 = { v237, v241 };
            fun.drawBLine(dxf, Line212, 0.08, contour);
            Vector2[] Line213 = { v236, v242 };
            fun.drawBLine(dxf, Line213, 0.08, contour);
            LwPolyline Arc17 = new LwPolyline();
            Arc17.Vertexes.Add(new LwPolylineVertex(v242));
            Arc17.Vertexes.Add(new LwPolylineVertex(v243));
            Arc17.Vertexes[0].Bulge = -f / 12 * Math.Tan(par) / Math.Sin(par);
            fun.PolyFill(dxf, Arc17, 0.08, contour);
            Vector2[] Line214 = { v243, v244 };
            fun.drawBLine(dxf, Line214, 0.08, contour);
            Vector2[] Line215 = { v245, v244 };
            fun.drawBLine(dxf, Line215, 0.08, contour);
            Vector2[] Line216 = { v244, v246 };
            fun.drawBLine(dxf, Line216, 0.08, contour);
            Vector2[] Line217 = { v247, v246 };
            fun.drawBLine(dxf, Line217, 0.08, contour);
            Vector2[] Line218 = { v247, v248 };
            fun.drawBLine(dxf, Line218, 0.08, contour);
            Vector2[] Line219 = { v249, v248 };
            fun.drawBLine(dxf, Line219, 0.08, contour);
            Vector2[] Line220 = { v249, v250 };
            fun.drawBLine(dxf, Line220, 0.08, contour);
            Vector2[] Line221 = { v248, v251 };
            fun.drawBLine(dxf, Line221, 0.08, contour);
            Vector2[] Line222 = { v241, v251 };
            fun.drawBLine(dxf, Line222, 0.08, contour);
            Vector2[] Line223 = { v250, v252 };
            fun.drawBLine(dxf, Line223, 0.08, contour);
            //LwPolyline Arc18 = new LwPolyline();
            //Arc18.Vertexes.Add(new LwPolylineVertex(v253));
            //Arc18.Vertexes.Add(new LwPolylineVertex(v254));
            //Arc18.Vertexes[0].Bulge = -f * Math.Tan(par) / Math.Sin(par);
            //fun.PolyFill(dxf, Arc18, 0.08, contour);
            Vector2[] Line224 = { v254, v255 };
            fun.drawBLine(dxf, Line224, 0.08, contour);
            //Vector2[] Line225 = { v256, v246 };
            //fun.drawBLine(dxf, Line225, 0.08, skdimensioning);
            //Vector2[] Line226 = { v257, v248 };
            //fun.drawBLine(dxf, Line226, 0.08, skdimensioning);
            //中间
            Vector2[] Line227 = { v258, v255 };
            fun.drawBLine(dxf, Line227, 0.08, contour);
            Vector2[] Line228 = { v258, v259 };
            fun.drawBLine(dxf, Line228, 0.08, contour);
            Vector2[] Line229 = { v260, v255 };
            fun.drawBLine(dxf, Line229, 0.08, contour);
            Vector2[] Line230 = { v260, v261 };
            fun.drawBLine(dxf, Line230, 0.08, contour);
            Vector2[] Line231 = { v258, v261 };
            fun.drawBLine(dxf, Line231, 0.08, contour);
            Vector2[] Line232 = { v262, v261 };
            fun.drawBLine(dxf, Line232, 0.08, contour);
            Vector2[] Line233 = { v263, v260 };
            fun.drawBLine(dxf, Line233, 0.08, contour);
            Vector2[] Line234 = { v263, v264 };
            fun.drawBLine(dxf, Line234, 0.08, contour);
            Vector2[] Line235 = { v261, v264 };
            fun.drawBLine(dxf, Line235, 0.08, contour);
            Vector2[] Line236 = { v265, v264 };
            fun.drawBLine(dxf, Line236, 0.08, contour);
            Vector2[] Line237 = { v266, v265 };
            fun.drawBLine(dxf, Line237, 0.08, contour);
            Vector2[] Line238 = { v267, v268 };
            fun.drawBLine(dxf, Line238, 0.08, contour);
            LwPolyline Arc19 = new LwPolyline();
            Arc19.Vertexes.Add(new LwPolylineVertex(v268));
            Arc19.Vertexes.Add(new LwPolylineVertex(v269));
            Arc19.Vertexes[0].Bulge = f / 1.6 * Math.Tan(par) / Math.Sin(par);
            fun.PolyFill(dxf, Arc19, 0.08, contour);
            Vector2[] Line239 = { v269, v270 };
            fun.drawBLine(dxf, Line239, 0.08, contour);
            Vector2[] Line240 = { v271, v270 };
            fun.drawBLine(dxf, Line240, 0.08, contour);
            //LwPolyline poly3 = new LwPolyline();
            //poly3.Vertexes.Add(new LwPolylineVertex(fun.Polar(v272, 0, f / 1.6)));
            //poly3.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly3.Vertexes.Add(new LwPolylineVertex(fun.Polar(v272, Math.PI, f / 1.6)));
            //poly3.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly3.Vertexes.Add(new LwPolylineVertex(fun.Polar(v272, 0, f / 1.6)));
            //fun.PolyFill(dxf, poly3, 0.08, contour);
            LwPolyline poly4 = new LwPolyline();
            poly4.Vertexes.Add(new LwPolylineVertex(fun.Polar(v273, 0, f / 1.3)));
            poly4.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly4.Vertexes.Add(new LwPolylineVertex(fun.Polar(v273, Math.PI, f / 1.3)));
            poly4.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly4.Vertexes.Add(new LwPolylineVertex(fun.Polar(v273, 0, f / 1.3)));
            fun.PolyFill(dxf, poly4, 0.08, contour);
            Vector2[] Line241 = { v266, v274 };
            fun.drawBLine(dxf, Line241, 0.08, contour);
            Vector2[] Line242 = { v275, v274 };
            fun.drawBLine(dxf, Line242, 0.08, contour);
            Vector2[] Line243 = { v275, v276 };
            fun.drawBLine(dxf, Line243, 0.08, contour);
            LwPolyline Arc20 = new LwPolyline();
            Arc20.Vertexes.Add(new LwPolylineVertex(v275));
            Arc20.Vertexes.Add(new LwPolylineVertex(v274));
            Arc20.Vertexes[0].Bulge = -f / 1.2 * Math.Tan(par) / Math.Sin(par);
            fun.PolyFill(dxf, Arc20, 0.08, contour);
            LwPolyline Arc21 = new LwPolyline();
            Arc21.Vertexes.Add(new LwPolylineVertex(v274));
            Arc21.Vertexes.Add(new LwPolylineVertex(v277));
            Arc21.Vertexes[0].Bulge = f / 8 * Math.Tan(par) / Math.Sin(par);
            fun.PolyFill(dxf, Arc21, 0.08, contour);
            Vector2[] Line244 = { v278, v277 };
            fun.drawBLine(dxf, Line244, 0.08, contour);
            //Vector2[] Line245 = { v279, v280 };
            //fun.drawBLine(dxf, Line245, 0.06, contour);
            //Vector2[] Line246 = { v279, v281 };
            //fun.drawBLine(dxf, Line246, 0.06, contour);
            Vector2[] Line247 = { v282, v271 };
            fun.drawBLine(dxf, Line247, 0.08, contour);
            Vector2[] Line248 = { v282, v283 };
            fun.drawBLine(dxf, Line248, 0.08, contour);
            Vector2[] Line249 = { v284, v283 };
            fun.drawBLine(dxf, Line249, 0.08, contour);
            Vector2[] Line250 = { v284, v285 };
            fun.drawBLine(dxf, Line250, 0.08, contour);
            Vector2[] Line251 = { v286, v285 };
            fun.drawBLine(dxf, Line251, 0.08, contour);
            Vector2[] Line252 = { v282, v287 };
            fun.drawBLine(dxf, Line252, 0.08, contour);
            Vector2[] Line253 = { v288, v287 };
            fun.drawBLine(dxf, Line253, 0.08, contour);
            Vector2[] Line254 = { v289, v290 };
            fun.drawBLine(dxf, Line254, 0.08, contour);
            Vector2[] Line255 = { v271, v291 };
            fun.drawBLine(dxf, Line255, 0.08, contour);
            Vector2[] Line256 = { v292, v291 };
            fun.drawBLine(dxf, Line256, 0.08, contour);
            Vector2[] Line257 = { v293, v294 };
            fun.drawBLine(dxf, Line257, 0.08, contour);
            Vector2[] Line258 = { v293, v295 };
            fun.drawBLine(dxf, Line258, 0.08, contour);
            Vector2[] Line259 = { v296, v295 };
            fun.drawBLine(dxf, Line259, 0.08, contour);
            Vector2[] Line260 = { v297, v295 };
            fun.drawBLine(dxf, Line260, 0.08, contour);
            Vector2[] Line261 = { v299, v295 };
            fun.drawBLine(dxf, Line261, 0.08, contour);
            Vector2[] Line262 = { v294, v298 };
            fun.drawBLine(dxf, Line262, 0.08, contour);
            Vector2[] Line263 = { v300, v294 };
            fun.drawBLine(dxf, Line263, 0.08, contour);
            LwPolyline Arc22 = new LwPolyline();
            Arc22.Vertexes.Add(new LwPolylineVertex(v300));
            Arc22.Vertexes.Add(new LwPolylineVertex(v301));
            Arc22.Vertexes[0].Bulge = f / 1.5 * Math.Tan(par) / Math.Sin(par);
            fun.PolyFill(dxf, Arc22, 0.08, contour);
            Vector2[] Line264 = { v301, v302 };
            fun.drawBLine(dxf, Line264, 0.08, contour);
            Vector2[] Line265 = { v302, v303 };
            fun.drawBLine(dxf, Line265, 0.12, contour);
            Vector2[] Line266 = { v304, v302 };
            fun.drawBLine(dxf, Line266, 0.08, contour);
            Vector2[] Line267 = { v305, v306 };
            fun.drawBLine(dxf, Line267, 0.08, contour);
            Vector2[] Line268 = { v307, v304 };
            fun.drawBLine(dxf, Line268, 0.08, contour);
            LwPolyline Arc23 = new LwPolyline();
            Arc23.Vertexes.Add(new LwPolylineVertex(v298));
            Arc23.Vertexes.Add(new LwPolylineVertex(v251));
            Arc23.Vertexes[0].Bulge = f / 1.5 * Math.Tan(par) / Math.Sin(par);
            fun.PolyFill(dxf, Arc23, 0.08, contour);
            Vector2[] Line269 = { v308, v304 };
            fun.drawBLine(dxf, Line269, 0.08, contour);
            Vector2[] Line270 = { v309, v310 };
            fun.drawBLine(dxf, Line270, 0.12, contour);
            Vector2[] Line271 = { v311, v312 };
            fun.drawBLine(dxf, Line271, 0.08, contour);
            Vector2[] Line272 = { v313, v314 };
            fun.drawBLine(dxf, Line272, 0.12, contour);
            Vector2[] Line273 = { v315, v316 };
            fun.drawBLine(dxf, Line273, 0.08, contour);
            //Vector2[] Line274 = { v317, v318 };
            //fun.drawPlinetype(dxf, Line274, refin, Linetype.Dashed);
            //Vector2[] Line275 = { v319, v320 };
            //fun.drawPlinetype(dxf, Line275, refin, Linetype.Dashed);
            //LwPolyline Arc24 = new LwPolyline();
            //Arc24.Vertexes.Add(new LwPolylineVertex(v317));
            //Arc24.Vertexes.Add(new LwPolylineVertex(v320));
            //Arc24.Vertexes[0].Bulge = f / 1.5 * Math.Tan(par) / Math.Sin(par);
            //fun.PolyFillandlinetype(dxf, Arc24, 0.08, refin, Linetype.Dashed);
            //LwPolyline Arc25 = new LwPolyline();
            //Arc25.Vertexes.Add(new LwPolylineVertex(v318));
            //Arc25.Vertexes.Add(new LwPolylineVertex(v319));
            //Arc25.Vertexes[0].Bulge = -f / 1.5 * Math.Tan(par) / Math.Sin(par);
            //fun.PolyFillandlinetype(dxf, Arc25, 0.08, refin, Linetype.Dashed);
            //Vector2[] Line276 = { v322, v321 };
            //fun.drawPlinetype(dxf, Line276, refin, Linetype.Dashed);
            //Vector2[] Line277 = { v323, v324 };
            //fun.drawPlinetype(dxf, Line277, refin, Linetype.Dashed);
            //Vector2[] Line278 = { v325, v322 };
            //fun.drawPlinetype(dxf, Line278, refin, Linetype.Dashed);
            //Vector2[] Line279 = { v326, v324 };
            //fun.drawPlinetype(dxf, Line279, refin, Linetype.Dashed);
            //Vector2[] Line280 = { v327, v326 };
            //fun.drawBLine(dxf, Line280, 0.08, contour);

            //
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint5(Dictionary<string, Object> data)     //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double r = 13.5;
            double r1 = 30;
            double f = 1;
            double pi = Math.PI;
            double par = 28 * pi / 180;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v225 = new Vector2(v1.X + r1, v1.Y);
            Vector2 v226 = new Vector2(v225.X, v225.Y - r - r / 1.3);
            Vector2 v227 = new Vector2(v225.X, v225.Y + r + r / 1.3);
            //
            Vector2 v228 = new Vector2(v226.X + r, v226.Y);
            Vector2 v229 = new Vector2(v227.X + r, v227.Y);
            //虚线前端口
            Vector2 v230 = new Vector2(v229.X + f * 2, v229.Y + f);
            Vector2 v231 = new Vector2(v228.X + f * 2, v228.Y - f);
            //半段虚线
            Vector2 v232 = new Vector2(v226.X + r / 2, v226.Y);
            Vector2 v233 = new Vector2(v226.X + r / 2, v226.Y + (r + r / 1.3) / 2);
            Vector2 v234 = new Vector2(v227.X + r / 2, v227.Y);
            Vector2 v235 = new Vector2(v227.X + r / 2, v227.Y - (r + r / 1.3) / 2);
            //斜边
            Vector2 v236 = new Vector2(v230.X + r + f, v230.Y + f * 6);
            //
            Vector2 v237 = new Vector2(v231.X + r + f, v231.Y - f * 6);
            //
            Vector2 v238 = new Vector2(v236.X + f * 3, v236.Y + f / 3.8);
            Vector2 v239 = new Vector2(v237.X + f * 3, v237.Y - f / 3.8);
            //下半部得横向
            Vector2 v240 = new Vector2(v238.X + f * 6, v238.Y - f * 2);
            Vector2 v241 = new Vector2(v237.X + f * 6, v237.Y);
            //
            Vector2 v242 = new Vector2(v236.X + f * 5, v236.Y + f * 1.6);
            Vector2 v243 = new Vector2(v242.X + f * 1.6, v242.Y + f / 4.6);
            Vector2 v244 = new Vector2(v243.X + f, v243.Y);
            //
            Vector2 v245 = new Vector2(v244.X - f * 2.6, v244.Y - f * 2.2);
            //
            Vector2 v246 = new Vector2(v244.X + f * 0.5, v244.Y + f * 0.2);
            Vector2 v247 = new Vector2(v246.X + f * 1.5, v246.Y - f * 1.42);
            Vector2 v248 = new Vector2(v247.X + f * 0.3, v247.Y - f * 0.5);
            Vector2 v249 = new Vector2(v248.X - f * 0.9, v248.Y - f * 1.8);
            //
            Vector2 v250 = new Vector2(v249.X, v249.Y - f);
            Vector2 v251 = new Vector2(v248.X, v248.Y - r1 * 2);
            //
            Vector2 v252 = new Vector2(v250.X + f * 4 / 5, v250.Y - f - f / 5);
            //
            Vector2 v253 = new Vector2(v238.X + f * 2 + (f * 2), v238.Y - (f * 2) + f / 1.5);
            Vector2 v254 = new Vector2(v238.X + f * 2 + (f * 2) * 1.5, v238.Y - (f * 2) + f / 3);
            //
            Vector2 v255 = new Vector2(v254.X, v254.Y - r / 1.3);
            //
            Vector2 v256 = new Vector2(v246.X - r + f / 2, v246.Y + r - f * 2);
            Vector2 v257 = new Vector2(v248.X, v248.Y + r + f * 6);
            //
            Vector2 v258 = new Vector2(v255.X + f / 3, v255.Y);
            Vector2 v259 = new Vector2(v258.X + f + f / 2, v258.Y - f);
            Vector2 v260 = new Vector2(v255.X - f / 3, v255.Y);
            Vector2 v261 = new Vector2(v260.X + f / 5, v260.Y - f * 7 / 10);
            Vector2 v262 = new Vector2(v261.X + f * 2, v261.Y - f - f / 2);
            Vector2 v263 = new Vector2(v260.X - f * 2 - f * 3 / 5, v260.Y - f * 2 - f / 5);
            Vector2 v264 = new Vector2(v263.X - f / 5, v263.Y - f);
            Vector2 v265 = new Vector2(v264.X + f * 3, v264.Y - f * 2 - f * 7 / 10);
            Vector2 v266 = new Vector2(v265.X + f * 2, v265.Y + f * 2);
            //前端圆弧
            Vector2 v267 = new Vector2(v260.X - f * 2 - f * 3 / 8, v260.Y - f * 2);
            Vector2 v268 = new Vector2(v267.X - f * 5, v267.Y + f * 1.8);
            Vector2 v269 = new Vector2(v268.X - f * 3.9, v268.Y - f * 3 - f);
            Vector2 v270 = new Vector2(v269.X + f * 3.6, v269.Y - r / 1.6);
            Vector2 v271 = new Vector2(v270.X + f * 6.6, v270.Y - f * 9);
            //圆心
            Vector2 v272 = new Vector2(v260.X, v260.Y - f * 3);
            Vector2 v273 = new Vector2(v272.X - f * 4.6, v272.Y - f * 5);
            //新图下方
            Vector2 v274 = new Vector2(v266.X - f - f / 2, v266.Y - f * 2.6);
            Vector2 v275 = new Vector2(v274.X + f * 6 / 10, v274.Y - f * 3 / 5);
            Vector2 v276 = new Vector2(v275.X + f * 9 / 10, v275.Y + f + f * 6 / 10);
            //下圆链接
            Vector2 v277 = new Vector2(v265.X + f / 2, v265.Y - f * 1.5);
            Vector2 v278 = new Vector2(v277.X + f + f / 2, v277.Y - r + f * 2);
            //虚线后
            Vector2 v279 = new Vector2(v277.X, v277.Y + f / 9);
            Vector2 v280 = new Vector2(v279.X + f * 1.5, v279.Y);
            Vector2 v281 = new Vector2(v279.X - f * 2.6, v279.Y);
            //中心线下面
            Vector2 v282 = new Vector2(v271.X + f * 1.5, v271.Y);
            Vector2 v283 = new Vector2(v282.X, v282.Y + f + f / 2);
            Vector2 v284 = new Vector2(v283.X - f / 2, v283.Y + f * 3 / 5);
            Vector2 v285 = new Vector2(v284.X + f / 5, v284.Y + f * 4 / 5);
            Vector2 v286 = new Vector2(v285.X + f * 2.07, v285.Y - f / 2);
            Vector2 v287 = new Vector2(v282.X, v282.Y - f * 3);
            Vector2 v288 = new Vector2(v287.X + f * 1.8, v287.Y);
            Vector2 v289 = new Vector2(v282.X, v282.Y - f * 2);
            Vector2 v290 = new Vector2(v289.X + f * 1.8, v289.Y);
            Vector2 v291 = new Vector2(v271.X, v271.Y - f * 8);
            Vector2 v292 = new Vector2(v271.X + f * 3.3, v291.Y);
            Vector2 v293 = new Vector2(v271.X + f * 1.2, v292.Y);
            //待修改
            Vector2 v294 = new Vector2(v293.X - f * 2, v293.Y - f * 2 - f * 2);
            Vector2 v295 = new Vector2(v293.X - f * 0.6, v293.Y - f * 2.5 - f * 1.5);
            Vector2 v296 = new Vector2(v295.X + f * 2.66, v295.Y);
            Vector2 v297 = new Vector2(v295.X + f * 2.66, v295.Y - f * 2);
            //待修改
            Vector2 v298 = new Vector2(v294.X + f * 4, v294.Y - r + f * 3);
            Vector2 v299 = new Vector2(v295.X - f * 1.4, v295.Y);
            //竖线点
            Vector2 v300 = new Vector2(v294.X - f * 9.5, v294.Y + f * 4.7);
            //
            Vector2 v301 = new Vector2(v300.X - f * 3, v300.Y - f * 3.4);
            //
            Vector2 v302 = new Vector2(v301.X + f * 5.8, v301.Y - f * 11.8);
            //竖线1
            Vector2 v303 = new Vector2(v302.X, v302.Y - f * 5.4);
            //
            Vector2 v304 = new Vector2(v302.X + f * 6.75, v302.Y - f * 2.88);
            //竖线2
            Vector2 v305 = new Vector2(v302.X + f * 2, v302.Y - f * 0.9);
            Vector2 v306 = new Vector2(v305.X, v305.Y - f * 4.9);
            //
            Vector2 v307 = new Vector2(v304.X, v304.Y - f * 2.9);
            Vector2 v308 = new Vector2(v304.X + f * 2.46, v304.Y + f * 0.9);
            //竖线3组
            Vector2 v309 = new Vector2(v302.X, v300.Y - f * 1.3);
            Vector2 v310 = new Vector2(v302.X, v309.Y + r + f * 6);
            //
            Vector2 v311 = new Vector2(v305.X, v310.Y - f * 3.68);
            Vector2 v312 = new Vector2(v311.X, v311.Y - r - f * 3.29);
            //竖线4组
            Vector2 v313 = new Vector2(v302.X, v309.Y + r + f * 6 + f * 10.78);
            Vector2 v314 = new Vector2(v302.X, v313.Y + f * 11.38);
            //
            Vector2 v315 = new Vector2(v305.X, v310.Y + f * 10.2);
            Vector2 v316 = new Vector2(v315.X, v315.Y + f * 12.6);
            //虚线
            Vector2 v317 = new Vector2(v233.X + f * 10, v233.Y);
            Vector2 v318 = new Vector2(v317.X, v235.Y);
            //
            Vector2 v319 = new Vector2(v317.X + f, v318.Y);
            Vector2 v320 = new Vector2(v317.X + f, v317.Y);
            //
            Vector2 v321 = new Vector2(v319.X, v319.Y - f * 5);
            Vector2 v322 = new Vector2(v319.X + r + f * 4.5, v321.Y);
            //
            Vector2 v323 = new Vector2(v320.X, v320.Y + f * 6);
            Vector2 v324 = new Vector2(v319.X + r + f * 4.5, v323.Y);
            //
            Vector2 v325 = new Vector2(v322.X, v322.Y + f * 4.6);
            Vector2 v326 = new Vector2(v324.X, v324.Y - f * 3.6);
            Vector2 v327 = new Vector2(v324.X + f * 4.1, v324.Y - f * 3.6);
            //图三
            Vector2[] Line225 = { v256, v246 };
            fun.drawBLine(dxf, Line225, 0.08, skdimensioning);
            Vector2[] Line226 = { v257, v248 };
            fun.drawBLine(dxf, Line226, 0.08, skdimensioning);
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 1;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 1.8;
            double offset = 6;
            //LinearDimension dim6 = new LinearDimension(new Line(v226, v227), offset * 6, 90, dimensionStyle);
            //dim6.UserText = "Φ62 ";
            //dxf.AddEntity(dim6);
            LinearDimension dim7 = new LinearDimension(new Line(v241, v246), offset * 4, 270, dimensionStyle);
            dim7.UserText = "Φ92 ";
            dxf.AddEntity(dim7);
            LinearDimension dim8 = new LinearDimension(new Line(v248, v251), offset * 2, 270, dimensionStyle);
            dim8.UserText = "Φ80 ";
            dxf.AddEntity(dim8);
            LinearDimension dim9 = new LinearDimension(new Line(v227, v248), offset * 6, 0, dimensionStyle);
            dim9.UserText = "（50） ";
            dxf.AddEntity(dim9);
            LinearDimension dim10 = new LinearDimension(new Line(v246, v248), offset * 1.6, 0, dimensionStyle);
            dim10.UserText = "6 ";
            dxf.AddEntity(dim10);
            Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v246, v256), new Line(v248, v257), offset * 3, dimensionStyle);
            angdim1.UserText = "45°";
            dxf.AddEntity(angdim1);
            //LinearDimension dim11 = new LinearDimension(new Line(v317, v318), offset * 6, 90, dimensionStyle);
            //dim11.UserText = "Φ27H7 ";
            //dxf.AddEntity(dim11);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v225.X - f* 6, v225.Y), new Vector2(v225.X + f* 2 + r* 3, v225.Y) }, centre, Linetype.Center);
            //
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint6(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double r = 13.5;
            double r1 = 30;
            double f = 1;
            double pi = Math.PI;
            double par = 28 * pi / 180;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v225 = new Vector2(v1.X + r1, v1.Y);
            Vector2 v226 = new Vector2(v225.X, v225.Y - r - r / 1.3);
            Vector2 v227 = new Vector2(v225.X, v225.Y + r + r / 1.3);
            //
            Vector2 v228 = new Vector2(v226.X + r, v226.Y);
            Vector2 v229 = new Vector2(v227.X + r, v227.Y);
            //虚线前端口
            Vector2 v230 = new Vector2(v229.X + f * 2, v229.Y + f);
            Vector2 v231 = new Vector2(v228.X + f * 2, v228.Y - f);
            //半段虚线
            Vector2 v232 = new Vector2(v226.X + r / 2, v226.Y);
            Vector2 v233 = new Vector2(v226.X + r / 2, v226.Y + (r + r / 1.3) / 2);
            Vector2 v234 = new Vector2(v227.X + r / 2, v227.Y);
            Vector2 v235 = new Vector2(v227.X + r / 2, v227.Y - (r + r / 1.3) / 2);
            //斜边
            Vector2 v236 = new Vector2(v230.X + r + f, v230.Y + f * 6);
            //
            Vector2 v237 = new Vector2(v231.X + r + f, v231.Y - f * 6);
            //
            Vector2 v238 = new Vector2(v236.X + f * 3, v236.Y + f / 3.8);
            Vector2 v239 = new Vector2(v237.X + f * 3, v237.Y - f / 3.8);
            //下半部得横向
            Vector2 v240 = new Vector2(v238.X + f * 6, v238.Y - f * 2);
            Vector2 v241 = new Vector2(v237.X + f * 6, v237.Y);
            //
            Vector2 v242 = new Vector2(v236.X + f * 5, v236.Y + f * 1.6);
            Vector2 v243 = new Vector2(v242.X + f * 1.6, v242.Y + f / 4.6);
            Vector2 v244 = new Vector2(v243.X + f, v243.Y);
            //
            Vector2 v245 = new Vector2(v244.X - f * 2.6, v244.Y - f * 2.2);
            //
            Vector2 v246 = new Vector2(v244.X + f * 0.5, v244.Y + f * 0.2);
            Vector2 v247 = new Vector2(v246.X + f * 1.5, v246.Y - f * 1.42);
            Vector2 v248 = new Vector2(v247.X + f * 0.3, v247.Y - f * 0.5);
            Vector2 v249 = new Vector2(v248.X - f * 0.9, v248.Y - f * 1.8);
            //
            Vector2 v250 = new Vector2(v249.X, v249.Y - f);
            Vector2 v251 = new Vector2(v248.X, v248.Y - r1 * 2);
            //
            Vector2 v252 = new Vector2(v250.X + f * 4 / 5, v250.Y - f - f / 5);
            //
            Vector2 v253 = new Vector2(v238.X + f * 2 + (f * 2), v238.Y - (f * 2) + f / 1.5);
            Vector2 v254 = new Vector2(v238.X + f * 2 + (f * 2) * 1.5, v238.Y - (f * 2) + f / 3);
            //
            Vector2 v255 = new Vector2(v254.X, v254.Y - r / 1.3);
            //
            Vector2 v256 = new Vector2(v246.X - r + f / 2, v246.Y + r - f * 2);
            Vector2 v257 = new Vector2(v248.X, v248.Y + r + f * 6);
            //
            Vector2 v258 = new Vector2(v255.X + f / 3, v255.Y);
            Vector2 v259 = new Vector2(v258.X + f + f / 2, v258.Y - f);
            Vector2 v260 = new Vector2(v255.X - f / 3, v255.Y);
            Vector2 v261 = new Vector2(v260.X + f / 5, v260.Y - f * 7 / 10);
            Vector2 v262 = new Vector2(v261.X + f * 2, v261.Y - f - f / 2);
            Vector2 v263 = new Vector2(v260.X - f * 2 - f * 3 / 5, v260.Y - f * 2 - f / 5);
            Vector2 v264 = new Vector2(v263.X - f / 5, v263.Y - f);
            Vector2 v265 = new Vector2(v264.X + f * 3, v264.Y - f * 2 - f * 7 / 10);
            Vector2 v266 = new Vector2(v265.X + f * 2, v265.Y + f * 2);
            //前端圆弧
            Vector2 v267 = new Vector2(v260.X - f * 2 - f * 3 / 8, v260.Y - f * 2);
            Vector2 v268 = new Vector2(v267.X - f * 5, v267.Y + f * 1.8);
            Vector2 v269 = new Vector2(v268.X - f * 3.9, v268.Y - f * 3 - f);
            Vector2 v270 = new Vector2(v269.X + f * 3.6, v269.Y - r / 1.6);
            Vector2 v271 = new Vector2(v270.X + f * 6.6, v270.Y - f * 9);
            //圆心
            Vector2 v272 = new Vector2(v260.X, v260.Y - f * 3);
            Vector2 v273 = new Vector2(v272.X - f * 4.6, v272.Y - f * 5);
            //新图下方
            Vector2 v274 = new Vector2(v266.X - f - f / 2, v266.Y - f * 2.6);
            Vector2 v275 = new Vector2(v274.X + f * 6 / 10, v274.Y - f * 3 / 5);
            Vector2 v276 = new Vector2(v275.X + f * 9 / 10, v275.Y + f + f * 6 / 10);
            //下圆链接
            Vector2 v277 = new Vector2(v265.X + f / 2, v265.Y - f * 1.5);
            Vector2 v278 = new Vector2(v277.X + f + f / 2, v277.Y - r + f * 2);
            //虚线后
            Vector2 v279 = new Vector2(v277.X, v277.Y + f / 9);
            Vector2 v280 = new Vector2(v279.X + f * 1.5, v279.Y);
            Vector2 v281 = new Vector2(v279.X - f * 2.6, v279.Y);
            //中心线下面
            Vector2 v282 = new Vector2(v271.X + f * 1.5, v271.Y);
            Vector2 v283 = new Vector2(v282.X, v282.Y + f + f / 2);
            Vector2 v284 = new Vector2(v283.X - f / 2, v283.Y + f * 3 / 5);
            Vector2 v285 = new Vector2(v284.X + f / 5, v284.Y + f * 4 / 5);
            Vector2 v286 = new Vector2(v285.X + f * 2.07, v285.Y - f / 2);
            Vector2 v287 = new Vector2(v282.X, v282.Y - f * 3);
            Vector2 v288 = new Vector2(v287.X + f * 1.8, v287.Y);
            Vector2 v289 = new Vector2(v282.X, v282.Y - f * 2);
            Vector2 v290 = new Vector2(v289.X + f * 1.8, v289.Y);
            Vector2 v291 = new Vector2(v271.X, v271.Y - f * 8);
            Vector2 v292 = new Vector2(v271.X + f * 3.3, v291.Y);
            Vector2 v293 = new Vector2(v271.X + f * 1.2, v292.Y);
            //待修改
            Vector2 v294 = new Vector2(v293.X - f * 2, v293.Y - f * 2 - f * 2);
            Vector2 v295 = new Vector2(v293.X - f * 0.6, v293.Y - f * 2.5 - f * 1.5);
            Vector2 v296 = new Vector2(v295.X + f * 2.66, v295.Y);
            Vector2 v297 = new Vector2(v295.X + f * 2.66, v295.Y - f * 2);
            //待修改
            Vector2 v298 = new Vector2(v294.X + f * 4, v294.Y - r + f * 3);
            Vector2 v299 = new Vector2(v295.X - f * 1.4, v295.Y);
            //竖线点
            Vector2 v300 = new Vector2(v294.X - f * 9.5, v294.Y + f * 4.7);
            //
            Vector2 v301 = new Vector2(v300.X - f * 3, v300.Y - f * 3.4);
            //
            Vector2 v302 = new Vector2(v301.X + f * 5.8, v301.Y - f * 11.8);
            //竖线1
            Vector2 v303 = new Vector2(v302.X, v302.Y - f * 5.4);
            //
            Vector2 v304 = new Vector2(v302.X + f * 6.75, v302.Y - f * 2.88);
            //竖线2
            Vector2 v305 = new Vector2(v302.X + f * 2, v302.Y - f * 0.9);
            Vector2 v306 = new Vector2(v305.X, v305.Y - f * 4.9);
            //
            Vector2 v307 = new Vector2(v304.X, v304.Y - f * 2.9);
            Vector2 v308 = new Vector2(v304.X + f * 2.46, v304.Y + f * 0.9);
            //竖线3组
            Vector2 v309 = new Vector2(v302.X, v300.Y - f * 1.3);
            Vector2 v310 = new Vector2(v302.X, v309.Y + r + f * 6);
            //
            Vector2 v311 = new Vector2(v305.X, v310.Y - f * 3.68);
            Vector2 v312 = new Vector2(v311.X, v311.Y - r - f * 3.29);
            //竖线4组
            Vector2 v313 = new Vector2(v302.X, v309.Y + r + f * 6 + f * 10.78);
            Vector2 v314 = new Vector2(v302.X, v313.Y + f * 11.38);
            //
            Vector2 v315 = new Vector2(v305.X, v310.Y + f * 10.2);
            Vector2 v316 = new Vector2(v315.X, v315.Y + f * 12.6);
            //虚线
            Vector2 v317 = new Vector2(v233.X + f * 10, v233.Y);
            Vector2 v318 = new Vector2(v317.X, v235.Y);
            //
            Vector2 v319 = new Vector2(v317.X + f, v318.Y);
            Vector2 v320 = new Vector2(v317.X + f, v317.Y);
            //
            Vector2 v321 = new Vector2(v319.X, v319.Y - f * 5);
            Vector2 v322 = new Vector2(v319.X + r + f * 4.5, v321.Y);
            //
            Vector2 v323 = new Vector2(v320.X, v320.Y + f * 6);
            Vector2 v324 = new Vector2(v319.X + r + f * 4.5, v323.Y);
            //
            Vector2 v325 = new Vector2(v322.X, v322.Y + f * 4.6);
            Vector2 v326 = new Vector2(v324.X, v324.Y - f * 3.6);
            Vector2 v327 = new Vector2(v324.X + f * 4.1, v324.Y - f * 3.6);
            //图三
            //Vector2[] Line225 = { v256, v246 };
            //fun.drawBLine(dxf, Line225, 0.08, skdimensioning);
            //Vector2[] Line226 = { v257, v248 };
            //fun.drawBLine(dxf, Line226, 0.08, skdimensioning);
            //DimensionStyle dimensionStyle = fun.CreateDimStyle();
            //dimensionStyle.ArrowSize = 1;
            //dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.TextHeight = 1.8;
            //double offset = 6;
            //LinearDimension dim6 = new LinearDimension(new Line(v226, v227), offset * 6, 90, dimensionStyle);
            //dim6.UserText = "Φ62 ";
            //dxf.AddEntity(dim6);
            //LinearDimension dim7 = new LinearDimension(new Line(v241, v246), offset * 4, 270, dimensionStyle);
            //dim7.UserText = "Φ92 ";
            //dxf.AddEntity(dim7);
            //LinearDimension dim8 = new LinearDimension(new Line(v248, v251), offset * 2, 270, dimensionStyle);
            //dim8.UserText = "Φ80 ";
            //dxf.AddEntity(dim8);
            //LinearDimension dim9 = new LinearDimension(new Line(v227, v248), offset * 6, 0, dimensionStyle);
            //dim9.UserText = "（50） ";
            //dxf.AddEntity(dim9);
            //LinearDimension dim10 = new LinearDimension(new Line(v246, v248), offset * 1.6, 0, dimensionStyle);
            //dim10.UserText = "6 ";
            //dxf.AddEntity(dim10);
            //Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v246, v256), new Line(v248, v257), offset * 3, dimensionStyle);
            //angdim1.UserText = "45°";
            //dxf.AddEntity(angdim1);
            //LinearDimension dim11 = new LinearDimension(new Line(v317, v318), offset * 6, 90, dimensionStyle);
            //dim11.UserText = "Φ27H7 ";
            //dxf.AddEntity(dim11);
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v225.X - f * 6, v225.Y), new Vector2(v225.X + f * 2 + r * 3, v225.Y) }, 0.08, centre, Linetype.Center);
            //
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint7(Dictionary<string, Object> data)   //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double r = 13.5;
            double f = 1;
            double pi = Math.PI;
            double par = 28 * pi / 180;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + r);
            Vector2 v3 = new Vector2(v2.X + r / 2.6, v2.Y);
            Vector2 v4 = new Vector2(v3.X + f * 8.5, v3.Y + f * 5);
            Vector2 v5 = new Vector2(v4.X + f * 3, v4.Y);
            Vector2 v6 = new Vector2(v5.X + f * 2.4, v5.Y - f * 2.4);
            Vector2 v7 = new Vector2(v6.X - f * 3, v6.Y - f * 2.2);
            Vector2 v8 = new Vector2(v7.X, v1.Y);
            //
            Vector2[] Line1 = { v1, v2 };
            fun.drawBLine(dxf, Line1, 0.12, contour);
            Vector2[] Line2 = { v3, v2 };
            fun.drawBLine(dxf, Line2, 0.12, contour);
            Vector2[] Line3 = { v3, v4 };
            fun.drawBLine(dxf, Line3, 0.12, contour);
            Vector2[] Line4 = { v5, v4 };
            fun.drawBLine(dxf, Line4, 0.12, contour);
            Vector2[] Line5 = { v5, v6 };
            fun.drawBLine(dxf, Line5, 0.12, contour);
            Vector2[] Line6 = { v7, v6 };
            fun.drawBLine(dxf, Line6, 0.12, contour);
            Vector2[] Line7 = { v7, v8 };
            fun.drawBLine(dxf, Line7, 0.12, contour);
            Vector2[] Line8 = { v8, v1 };
            fun.drawBLine(dxf, Line8, 0.12, contour);

            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint8(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double r = 13.5;
            double f = 1;
            double pi = Math.PI;
            double par = 28 * pi / 180;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + f, v1.Y);
            Vector2 v3 = new Vector2(v2.X + f * 2.5, v2.Y + f * 2.5);
            Vector2 v4 = new Vector2(v3.X, v3.Y + f);
            Vector2 v5 = new Vector2(v4.X - f * 2.5, v4.Y + f * 2.5);
            Vector2 v6 = new Vector2(v5.X - f, v5.Y);
            Vector2 v7 = new Vector2(v6.X - f * 2.42, v6.Y - f * 2.75);
            Vector2 v8 = new Vector2(v7.X, v7.Y - f);
            //
            Vector2[] Line1 = { v1, v2 };
            fun.drawBLine(dxf, Line1, 0.12, contour);
            Vector2[] Line2 = { v3, v2 };
            fun.drawBLine(dxf, Line2, 0.12, contour);
            Vector2[] Line3 = { v3, v4 };
            fun.drawBLine(dxf, Line3, 0.12, contour);
            Vector2[] Line4 = { v5, v4 };
            fun.drawBLine(dxf, Line4, 0.12, contour);
            Vector2[] Line5 = { v5, v6 };
            fun.drawBLine(dxf, Line5, 0.12, contour);
            Vector2[] Line6 = { v7, v6 };
            fun.drawBLine(dxf, Line6, 0.12, contour);
            Vector2[] Line7 = { v7, v8 };
            fun.drawBLine(dxf, Line7, 0.12, contour);
            Vector2[] Line8 = { v1, v8 };
            fun.drawBLine(dxf, Line8, 0.12, contour);
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint9(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double r = 13.5;
            double r1 = 30;
            double f = 1;
            double pi = Math.PI;
            double par = 28 * pi / 180;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v225 = new Vector2(v1.X + r1, v1.Y);
            Vector2 v226 = new Vector2(v225.X, v225.Y - r - r / 1.3);
            Vector2 v227 = new Vector2(v225.X, v225.Y + r + r / 1.3);
            //
            Vector2 v228 = new Vector2(v226.X + r, v226.Y);
            Vector2 v229 = new Vector2(v227.X + r, v227.Y);
            //虚线前端口
            Vector2 v230 = new Vector2(v229.X + f * 2, v229.Y + f);
            Vector2 v231 = new Vector2(v228.X + f * 2, v228.Y - f);
            //半段虚线
            Vector2 v232 = new Vector2(v226.X + r / 2, v226.Y);
            Vector2 v233 = new Vector2(v226.X + r / 2, v226.Y + (r + r / 1.3) / 2);
            Vector2 v234 = new Vector2(v227.X + r / 2, v227.Y);
            Vector2 v235 = new Vector2(v227.X + r / 2, v227.Y - (r + r / 1.3) / 2);
            //斜边
            Vector2 v236 = new Vector2(v230.X + r + f, v230.Y + f * 6);
            //
            Vector2 v237 = new Vector2(v231.X + r + f, v231.Y - f * 6);
            //
            Vector2 v238 = new Vector2(v236.X + f * 3, v236.Y + f / 3.8);
            Vector2 v239 = new Vector2(v237.X + f * 3, v237.Y - f / 3.8);
            //下半部得横向
            Vector2 v240 = new Vector2(v238.X + f * 6, v238.Y - f * 2);
            Vector2 v241 = new Vector2(v237.X + f * 6, v237.Y);
            //
            Vector2 v242 = new Vector2(v236.X + f * 5, v236.Y + f * 1.6);
            Vector2 v243 = new Vector2(v242.X + f * 1.6, v242.Y + f / 4.6);
            Vector2 v244 = new Vector2(v243.X + f, v243.Y);
            //
            Vector2 v245 = new Vector2(v244.X - f * 2.6, v244.Y - f * 2.2);
            //
            Vector2 v246 = new Vector2(v244.X + f * 0.5, v244.Y + f * 0.2);
            Vector2 v247 = new Vector2(v246.X + f * 1.5, v246.Y - f * 1.42);
            Vector2 v248 = new Vector2(v247.X + f * 0.3, v247.Y - f * 0.5);
            Vector2 v249 = new Vector2(v248.X - f * 0.9, v248.Y - f * 1.8);
            //
            Vector2 v250 = new Vector2(v249.X, v249.Y - f);
            Vector2 v251 = new Vector2(v248.X, v248.Y - r1 * 2);
            //
            Vector2 v252 = new Vector2(v250.X + f * 4 / 5, v250.Y - f - f / 5);
            //
            Vector2 v253 = new Vector2(v238.X + f * 2 + (f * 2), v238.Y - (f * 2) + f / 1.5);
            Vector2 v254 = new Vector2(v238.X + f * 2 + (f * 2) * 1.5, v238.Y - (f * 2) + f / 3);
            //
            Vector2 v255 = new Vector2(v254.X, v254.Y - r / 1.3);
            //
            Vector2 v256 = new Vector2(v246.X - r + f / 2, v246.Y + r - f * 2);
            Vector2 v257 = new Vector2(v248.X, v248.Y + r + f * 6);
            //
            Vector2 v258 = new Vector2(v255.X + f / 3, v255.Y);
            Vector2 v259 = new Vector2(v258.X + f + f / 2, v258.Y - f);
            Vector2 v260 = new Vector2(v255.X - f / 3, v255.Y);
            Vector2 v261 = new Vector2(v260.X + f / 5, v260.Y - f * 7 / 10);
            Vector2 v262 = new Vector2(v261.X + f * 2, v261.Y - f - f / 2);
            Vector2 v263 = new Vector2(v260.X - f * 2 - f * 3 / 5, v260.Y - f * 2 - f / 5);
            Vector2 v264 = new Vector2(v263.X - f / 5, v263.Y - f);
            Vector2 v265 = new Vector2(v264.X + f * 3, v264.Y - f * 2 - f * 7 / 10);
            Vector2 v266 = new Vector2(v265.X + f * 2, v265.Y + f * 2);
            //前端圆弧
            Vector2 v267 = new Vector2(v260.X - f * 2 - f * 3 / 8, v260.Y - f * 2);
            Vector2 v268 = new Vector2(v267.X - f * 5, v267.Y + f * 1.8);
            Vector2 v269 = new Vector2(v268.X - f * 3.9, v268.Y - f * 3 - f);
            Vector2 v270 = new Vector2(v269.X + f * 3.6, v269.Y - r / 1.6);
            Vector2 v271 = new Vector2(v270.X + f * 6.6, v270.Y - f * 9);
            //圆心
            Vector2 v272 = new Vector2(v260.X, v260.Y - f * 3);
            Vector2 v273 = new Vector2(v272.X - f * 4.6, v272.Y - f * 5);
            //新图下方
            Vector2 v274 = new Vector2(v266.X - f - f / 2, v266.Y - f * 2.6);
            Vector2 v275 = new Vector2(v274.X + f * 6 / 10, v274.Y - f * 3 / 5);
            Vector2 v276 = new Vector2(v275.X + f * 9 / 10, v275.Y + f + f * 6 / 10);
            //下圆链接
            Vector2 v277 = new Vector2(v265.X + f / 2, v265.Y - f * 1.5);
            Vector2 v278 = new Vector2(v277.X + f + f / 2, v277.Y - r + f * 2);
            //虚线后
            Vector2 v279 = new Vector2(v277.X, v277.Y + f / 9);
            Vector2 v280 = new Vector2(v279.X + f * 1.5, v279.Y);
            Vector2 v281 = new Vector2(v279.X - f * 2.6, v279.Y);
            //中心线下面
            Vector2 v282 = new Vector2(v271.X + f * 1.5, v271.Y);
            Vector2 v283 = new Vector2(v282.X, v282.Y + f + f / 2);
            Vector2 v284 = new Vector2(v283.X - f / 2, v283.Y + f * 3 / 5);
            Vector2 v285 = new Vector2(v284.X + f / 5, v284.Y + f * 4 / 5);
            Vector2 v286 = new Vector2(v285.X + f * 2.07, v285.Y - f / 2);
            Vector2 v287 = new Vector2(v282.X, v282.Y - f * 3);
            Vector2 v288 = new Vector2(v287.X + f * 1.8, v287.Y);
            Vector2 v289 = new Vector2(v282.X, v282.Y - f * 2);
            Vector2 v290 = new Vector2(v289.X + f * 1.8, v289.Y);
            Vector2 v291 = new Vector2(v271.X, v271.Y - f * 8);
            Vector2 v292 = new Vector2(v271.X + f * 3.3, v291.Y);
            Vector2 v293 = new Vector2(v271.X + f * 1.2, v292.Y);
            //待修改
            Vector2 v294 = new Vector2(v293.X - f * 2, v293.Y - f * 2 - f * 2);
            Vector2 v295 = new Vector2(v293.X - f * 0.6, v293.Y - f * 2.5 - f * 1.5);
            Vector2 v296 = new Vector2(v295.X + f * 2.66, v295.Y);
            Vector2 v297 = new Vector2(v295.X + f * 2.66, v295.Y - f * 2);
            //待修改
            Vector2 v298 = new Vector2(v294.X + f * 4, v294.Y - r + f * 3);
            Vector2 v299 = new Vector2(v295.X - f * 1.4, v295.Y);
            //竖线点
            Vector2 v300 = new Vector2(v294.X - f * 9.5, v294.Y + f * 4.7);
            //
            Vector2 v301 = new Vector2(v300.X - f * 3, v300.Y - f * 3.4);
            //
            Vector2 v302 = new Vector2(v301.X + f * 5.8, v301.Y - f * 11.8);
            //竖线1
            Vector2 v303 = new Vector2(v302.X, v302.Y - f * 5.4);
            //
            Vector2 v304 = new Vector2(v302.X + f * 6.75, v302.Y - f * 2.88);
            //竖线2
            Vector2 v305 = new Vector2(v302.X + f * 2, v302.Y - f * 0.9);
            Vector2 v306 = new Vector2(v305.X, v305.Y - f * 4.9);
            //
            Vector2 v307 = new Vector2(v304.X, v304.Y - f * 2.9);
            Vector2 v308 = new Vector2(v304.X + f * 2.46, v304.Y + f * 0.9);
            //竖线3组
            Vector2 v309 = new Vector2(v302.X, v300.Y - f * 1.3);
            Vector2 v310 = new Vector2(v302.X, v309.Y + r + f * 6);
            //
            Vector2 v311 = new Vector2(v305.X, v310.Y - f * 3.68);
            Vector2 v312 = new Vector2(v311.X, v311.Y - r - f * 3.29);
            //竖线4组
            Vector2 v313 = new Vector2(v302.X, v309.Y + r + f * 6 + f * 10.78);
            Vector2 v314 = new Vector2(v302.X, v313.Y + f * 11.38);
            //
            Vector2 v315 = new Vector2(v305.X, v310.Y + f * 10.2);
            Vector2 v316 = new Vector2(v315.X, v315.Y + f * 12.6);
            //虚线
            Vector2 v317 = new Vector2(v233.X + f * 10, v233.Y);
            Vector2 v318 = new Vector2(v317.X, v235.Y);
            //
            Vector2 v319 = new Vector2(v317.X + f, v318.Y);
            Vector2 v320 = new Vector2(v317.X + f, v317.Y);
            //
            Vector2 v321 = new Vector2(v319.X, v319.Y - f * 5);
            Vector2 v322 = new Vector2(v319.X + r + f * 4.5, v321.Y);
            //
            Vector2 v323 = new Vector2(v320.X, v320.Y + f * 6);
            Vector2 v324 = new Vector2(v319.X + r + f * 4.5, v323.Y);
            //
            Vector2 v325 = new Vector2(v322.X, v322.Y + f * 4.6);
            Vector2 v326 = new Vector2(v324.X, v324.Y - f * 3.6);
            Vector2 v327 = new Vector2(v324.X + f * 4.1, v324.Y - f * 3.6);
            //图三
            //Vector2[] Line225 = { v256, v246 };
            //fun.drawBLine(dxf, Line225, 0.08, skdimensioning);
            //Vector2[] Line226 = { v257, v248 };
            //fun.drawBLine(dxf, Line226, 0.08, skdimensioning);
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 1;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 1.8;
            double offset = 6;
            LinearDimension dim6 = new LinearDimension(new Line(v226, v227), offset * 6, 90, dimensionStyle);
            dim6.UserText = "Φ62 ";
            dxf.AddEntity(dim6);
            //LinearDimension dim7 = new LinearDimension(new Line(v241, v246), offset * 4, 270, dimensionStyle);
            //dim7.UserText = "Φ92 ";
            //dxf.AddEntity(dim7);
            //LinearDimension dim8 = new LinearDimension(new Line(v248, v251), offset * 2, 270, dimensionStyle);
            //dim8.UserText = "Φ80 ";
            //dxf.AddEntity(dim8);
            //LinearDimension dim9 = new LinearDimension(new Line(v227, v248), offset * 6, 0, dimensionStyle);
            //dim9.UserText = "（50） ";
            //dxf.AddEntity(dim9);
            //LinearDimension dim10 = new LinearDimension(new Line(v246, v248), offset * 1.6, 0, dimensionStyle);
            //dim10.UserText = "6 ";
            //dxf.AddEntity(dim10);
            //Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v246, v256), new Line(v248, v257), offset * 3, dimensionStyle);
            //angdim1.UserText = "45°";
            //dxf.AddEntity(angdim1);
            LinearDimension dim11 = new LinearDimension(new Line(v317, v318), offset * 6, 90, dimensionStyle);
            dim11.UserText = "Φ27H7 ";
            dxf.AddEntity(dim11);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v225.X - f * 6, v225.Y), new Vector2(v225.X + f * 2 + r * 3, v225.Y) }, centre, Linetype.Center);
            //
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint10(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double r = 13.5;
            double r1 = 30;
            double f = 1;
            double pi = Math.PI;
            double par = 28 * pi / 180;
            string path = Convert.ToString(data["path"]);
            //主视图
            //图三
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v225 = new Vector2(v1.X + r1, v1.Y);
            Vector2 v226 = new Vector2(v225.X, v225.Y - r - r / 1.3);
            Vector2 v227 = new Vector2(v225.X, v225.Y + r + r / 1.3);
            //
            Vector2 v228 = new Vector2(v226.X + r, v226.Y);
            Vector2 v229 = new Vector2(v227.X + r, v227.Y);
            //虚线前端口
            Vector2 v230 = new Vector2(v229.X + f * 2, v229.Y + f);
            Vector2 v231 = new Vector2(v228.X + f * 2, v228.Y - f);
            //半段虚线
            Vector2 v232 = new Vector2(v226.X + r / 2, v226.Y);
            Vector2 v233 = new Vector2(v226.X + r / 2, v226.Y + (r + r / 1.3) / 2);
            Vector2 v234 = new Vector2(v227.X + r / 2, v227.Y);
            Vector2 v235 = new Vector2(v227.X + r / 2, v227.Y - (r + r / 1.3) / 2);
            //斜边
            Vector2 v236 = new Vector2(v230.X + r + f, v230.Y + f * 6);
            //
            Vector2 v237 = new Vector2(v231.X + r + f, v231.Y - f * 6);
            //
            Vector2 v238 = new Vector2(v236.X + f * 3, v236.Y + f / 3.8);
            Vector2 v239 = new Vector2(v237.X + f * 3, v237.Y - f / 3.8);
            //下半部得横向
            Vector2 v240 = new Vector2(v238.X + f * 6, v238.Y - f * 2);
            Vector2 v241 = new Vector2(v237.X + f * 6, v237.Y);
            //
            Vector2 v242 = new Vector2(v236.X + f * 5, v236.Y + f * 1.6);
            Vector2 v243 = new Vector2(v242.X + f * 1.6, v242.Y + f / 4.6);
            Vector2 v244 = new Vector2(v243.X + f, v243.Y);
            //
            Vector2 v245 = new Vector2(v244.X - f * 2.6, v244.Y - f * 2.2);
            //
            Vector2 v246 = new Vector2(v244.X + f * 0.5, v244.Y + f * 0.2);
            Vector2 v247 = new Vector2(v246.X + f * 1.5, v246.Y - f * 1.42);
            Vector2 v248 = new Vector2(v247.X + f * 0.3, v247.Y - f * 0.5);
            Vector2 v249 = new Vector2(v248.X - f * 0.9, v248.Y - f * 1.8);
            //
            Vector2 v250 = new Vector2(v249.X, v249.Y - f);
            Vector2 v251 = new Vector2(v248.X, v248.Y - r1 * 2);
            //
            Vector2 v252 = new Vector2(v250.X + f * 4 / 5, v250.Y - f - f / 5);
            //
            Vector2 v253 = new Vector2(v238.X + f * 2 + (f * 2), v238.Y - (f * 2) + f / 1.5);
            Vector2 v254 = new Vector2(v238.X + f * 2 + (f * 2) * 1.5, v238.Y - (f * 2) + f / 3);
            //
            Vector2 v255 = new Vector2(v254.X, v254.Y - r / 1.3);
            //
            Vector2 v256 = new Vector2(v246.X - r + f / 2, v246.Y + r - f * 2);
            Vector2 v257 = new Vector2(v248.X, v248.Y + r + f * 6);
            //
            Vector2 v258 = new Vector2(v255.X + f / 3, v255.Y);
            Vector2 v259 = new Vector2(v258.X + f + f / 2, v258.Y - f);
            Vector2 v260 = new Vector2(v255.X - f / 3, v255.Y);
            Vector2 v261 = new Vector2(v260.X + f / 5, v260.Y - f * 7 / 10);
            Vector2 v262 = new Vector2(v261.X + f * 2, v261.Y - f - f / 2);
            Vector2 v263 = new Vector2(v260.X - f * 2 - f * 3 / 5, v260.Y - f * 2 - f / 5);
            Vector2 v264 = new Vector2(v263.X - f / 5, v263.Y - f);
            Vector2 v265 = new Vector2(v264.X + f * 3, v264.Y - f * 2 - f * 7 / 10);
            Vector2 v266 = new Vector2(v265.X + f * 2, v265.Y + f * 2);
            //前端圆弧
            Vector2 v267 = new Vector2(v260.X - f * 2 - f * 3 / 8, v260.Y - f * 2);
            Vector2 v268 = new Vector2(v267.X - f * 5, v267.Y + f * 1.8);
            Vector2 v269 = new Vector2(v268.X - f * 3.9, v268.Y - f * 3 - f);
            Vector2 v270 = new Vector2(v269.X + f * 3.6, v269.Y - r / 1.6);
            Vector2 v271 = new Vector2(v270.X + f * 6.6, v270.Y - f * 9);
            //圆心
            Vector2 v272 = new Vector2(v260.X, v260.Y - f * 3);
            Vector2 v273 = new Vector2(v272.X - f * 4.6, v272.Y - f * 5);
            //新图下方
            Vector2 v274 = new Vector2(v266.X - f - f / 2, v266.Y - f * 2.6);
            Vector2 v275 = new Vector2(v274.X + f * 6 / 10, v274.Y - f * 3 / 5);
            Vector2 v276 = new Vector2(v275.X + f * 9 / 10, v275.Y + f + f * 6 / 10);
            //下圆链接
            Vector2 v277 = new Vector2(v265.X + f / 2, v265.Y - f * 1.5);
            Vector2 v278 = new Vector2(v277.X + f + f / 2, v277.Y - r + f * 2);
            //虚线后
            Vector2 v279 = new Vector2(v277.X, v277.Y + f / 9);
            Vector2 v280 = new Vector2(v279.X + f * 1.5, v279.Y);
            Vector2 v281 = new Vector2(v279.X - f * 2.6, v279.Y);
            //中心线下面
            Vector2 v282 = new Vector2(v271.X + f * 1.5, v271.Y);
            Vector2 v283 = new Vector2(v282.X, v282.Y + f + f / 2);
            Vector2 v284 = new Vector2(v283.X - f / 2, v283.Y + f * 3 / 5);
            Vector2 v285 = new Vector2(v284.X + f / 5, v284.Y + f * 4 / 5);
            Vector2 v286 = new Vector2(v285.X + f * 2.07, v285.Y - f / 2);
            Vector2 v287 = new Vector2(v282.X, v282.Y - f * 3);
            Vector2 v288 = new Vector2(v287.X + f * 1.8, v287.Y);
            Vector2 v289 = new Vector2(v282.X, v282.Y - f * 2);
            Vector2 v290 = new Vector2(v289.X + f * 1.8, v289.Y);
            Vector2 v291 = new Vector2(v271.X, v271.Y - f * 8);
            Vector2 v292 = new Vector2(v271.X + f * 3.3, v291.Y);
            Vector2 v293 = new Vector2(v271.X + f * 1.2, v292.Y);
            //待修改
            Vector2 v294 = new Vector2(v293.X - f * 2, v293.Y - f * 2 - f * 2);
            Vector2 v295 = new Vector2(v293.X - f * 0.6, v293.Y - f * 2.5 - f * 1.5);
            Vector2 v296 = new Vector2(v295.X + f * 2.66, v295.Y);
            Vector2 v297 = new Vector2(v295.X + f * 2.66, v295.Y - f * 2);
            //待修改
            Vector2 v298 = new Vector2(v294.X + f * 4, v294.Y - r + f * 3);
            Vector2 v299 = new Vector2(v295.X - f * 1.4, v295.Y);
            //竖线点
            Vector2 v300 = new Vector2(v294.X - f * 9.5, v294.Y + f * 4.7);
            //
            Vector2 v301 = new Vector2(v300.X - f * 3, v300.Y - f * 3.4);
            //
            Vector2 v302 = new Vector2(v301.X + f * 5.8, v301.Y - f * 11.8);
            //竖线1
            Vector2 v303 = new Vector2(v302.X, v302.Y - f * 5.4);
            //
            Vector2 v304 = new Vector2(v302.X + f * 6.75, v302.Y - f * 2.88);
            //竖线2
            Vector2 v305 = new Vector2(v302.X + f * 2, v302.Y - f * 0.9);
            Vector2 v306 = new Vector2(v305.X, v305.Y - f * 4.9);
            //
            Vector2 v307 = new Vector2(v304.X, v304.Y - f * 2.9);
            Vector2 v308 = new Vector2(v304.X + f * 2.46, v304.Y + f * 0.9);
            //竖线3组
            Vector2 v309 = new Vector2(v302.X, v300.Y - f * 1.3);
            Vector2 v310 = new Vector2(v302.X, v309.Y + r + f * 6);
            //
            Vector2 v311 = new Vector2(v305.X, v310.Y - f * 3.68);
            Vector2 v312 = new Vector2(v311.X, v311.Y - r - f * 3.29);
            //竖线4组
            Vector2 v313 = new Vector2(v302.X, v309.Y + r + f * 6 + f * 10.78);
            Vector2 v314 = new Vector2(v302.X, v313.Y + f * 11.38);
            //
            Vector2 v315 = new Vector2(v305.X, v310.Y + f * 10.2);
            Vector2 v316 = new Vector2(v315.X, v315.Y + f * 12.6);
            //虚线
            Vector2 v317 = new Vector2(v233.X + f * 10, v233.Y);
            Vector2 v318 = new Vector2(v317.X, v235.Y);
            //
            Vector2 v319 = new Vector2(v317.X + f, v318.Y);
            Vector2 v320 = new Vector2(v317.X + f, v317.Y);
            //
            Vector2 v321 = new Vector2(v319.X, v319.Y - f * 5);
            Vector2 v322 = new Vector2(v319.X + r + f * 4.5, v321.Y);
            //
            Vector2 v323 = new Vector2(v320.X, v320.Y + f * 6);
            Vector2 v324 = new Vector2(v319.X + r + f * 4.5, v323.Y);
            //
            Vector2 v325 = new Vector2(v322.X, v322.Y + f * 4.6);
            Vector2 v326 = new Vector2(v324.X, v324.Y - f * 3.6);
            Vector2 v327 = new Vector2(v324.X + f * 4.1, v324.Y - f * 4.5);
            //
            Vector2 v328 = new Vector2(v233.X - f * 6, v233.Y);
            Vector2 v329 = new Vector2(v233.X + f * 10, v233.Y);
            //
            Vector2 v330 = new Vector2(v235.X - f * 6, v235.Y);
            Vector2 v331 = new Vector2(v235.X + f * 10, v235.Y);
            //
            Vector2 v332 = new Vector2(v325.X + f * 6, v325.Y);
            Vector2 v333 = new Vector2(v326.X + f * 6, v326.Y);
            // 线段
            //主视图
            //图三
            //Vector2[] Line199 = { v225, v226 };
            //fun.drawBLine(dxf, Line199, 0.08, contour);
            //Vector2[] Line200 = { v225, v227 };
            //fun.drawBLine(dxf, Line200, 0.08, contour);
            //Vector2[] Line201 = { v226, v228 };
            //fun.drawBLine(dxf, Line201, 0.08, contour);
            //Vector2[] Line202 = { v227, v229 };
            //fun.drawBLine(dxf, Line202, 0.08, contour);
            //Vector2[] Line203 = { v228, v229 };
            //fun.drawBLine(dxf, Line203, 0.08, contour);
            //Vector2[] Line204 = { v230, v229 };
            //fun.drawBLine(dxf, Line204, 0.08, contour);
            ////虚线前
            //Vector2[] Line205 = { v231, v228 };
            //fun.drawBLine(dxf, Line205, 0.08, contour);
            //Vector2[] Line206 = { v231, v230 };
            //fun.drawBLine(dxf, Line206, 0.08, contour);
            //
            Vector2[] Line207 = { v232, v233 };
            fun.drawPlinetype(dxf, Line207, 0.1, refin, Linetype.Dashed);
            Vector2[] Line208 = { v234, v235 };
            fun.drawPlinetype(dxf, Line208, 0.1, refin, Linetype.Dashed);
            //
            //Vector2[] Line209 = { v230, v236 };
            //fun.drawBLine(dxf, Line209, 0.08, contour);
            //Vector2[] Line210 = { v231, v237 };
            //fun.drawBLine(dxf, Line210, 0.08, contour);
            //
            //LwPolyline Arc16 = new LwPolyline();
            //Arc16.Vertexes.Add(new LwPolylineVertex(v236));
            //Arc16.Vertexes.Add(new LwPolylineVertex(v238));
            //Arc16.Vertexes[0].Bulge = -f / 8 * Math.Tan(par) / Math.Sin(par);
            //fun.PolyFill(dxf, Arc16, 0.08, contour);
            ////LwPolyline Arc17 = new LwPolyline();
            ////Arc17.Vertexes.Add(new LwPolylineVertex(v237));
            ////Arc17.Vertexes.Add(new LwPolylineVertex(v239));
            ////Arc17.Vertexes[0].Bulge = f / 6 * Math.Tan(par) / Math.Sin(par);
            ////fun.PolyFill(dxf, Arc17, 0.08, contour);
            //Vector2[] Line211 = { v240, v238 };
            //fun.drawBLine(dxf, Line211, 0.08, contour);
            //Vector2[] Line212 = { v237, v241 };
            //fun.drawBLine(dxf, Line212, 0.08, contour);
            //Vector2[] Line213 = { v236, v242 };
            //fun.drawBLine(dxf, Line213, 0.08, contour);
            //LwPolyline Arc17 = new LwPolyline();
            //Arc17.Vertexes.Add(new LwPolylineVertex(v242));
            //Arc17.Vertexes.Add(new LwPolylineVertex(v243));
            //Arc17.Vertexes[0].Bulge = -f / 12 * Math.Tan(par) / Math.Sin(par);
            //fun.PolyFill(dxf, Arc17, 0.08, contour);
            //Vector2[] Line214 = { v243, v244 };
            //fun.drawBLine(dxf, Line214, 0.08, contour);
            //Vector2[] Line215 = { v245, v244 };
            //fun.drawBLine(dxf, Line215, 0.08, contour);
            //Vector2[] Line216 = { v244, v246 };
            //fun.drawBLine(dxf, Line216, 0.08, contour);
            //Vector2[] Line217 = { v247, v246 };
            //fun.drawBLine(dxf, Line217, 0.08, contour);
            //Vector2[] Line218 = { v247, v248 };
            //fun.drawBLine(dxf, Line218, 0.08, contour);
            //Vector2[] Line219 = { v249, v248 };
            //fun.drawBLine(dxf, Line219, 0.08, contour);
            //Vector2[] Line220 = { v249, v250 };
            //fun.drawBLine(dxf, Line220, 0.08, contour);
            //Vector2[] Line221 = { v248, v251 };
            //fun.drawBLine(dxf, Line221, 0.08, contour);
            //Vector2[] Line222 = { v241, v251 };
            //fun.drawBLine(dxf, Line222, 0.08, contour);
            //Vector2[] Line223 = { v250, v252 };
            //fun.drawBLine(dxf, Line223, 0.08, contour);
            ////LwPolyline Arc18 = new LwPolyline();
            ////Arc18.Vertexes.Add(new LwPolylineVertex(v253));
            ////Arc18.Vertexes.Add(new LwPolylineVertex(v254));
            ////Arc18.Vertexes[0].Bulge = -f * Math.Tan(par) / Math.Sin(par);
            ////fun.PolyFill(dxf, Arc18, 0.08, contour);
            //Vector2[] Line224 = { v254, v255 };
            //fun.drawBLine(dxf, Line224, 0.08, contour);
            //Vector2[] Line225 = { v256, v246 };
            //fun.drawBLine(dxf, Line225, 0.08, skdimensioning);
            //Vector2[] Line226 = { v257, v248 };
            //fun.drawBLine(dxf, Line226, 0.08, skdimensioning);
            //中间
            //Vector2[] Line227 = { v258, v255 };
            //fun.drawBLine(dxf, Line227, 0.08, contour);
            //Vector2[] Line228 = { v258, v259 };
            //fun.drawBLine(dxf, Line228, 0.08, contour);
            //Vector2[] Line229 = { v260, v255 };
            //fun.drawBLine(dxf, Line229, 0.08, contour);
            //Vector2[] Line230 = { v260, v261 };
            //fun.drawBLine(dxf, Line230, 0.08, contour);
            //Vector2[] Line231 = { v258, v261 };
            //fun.drawBLine(dxf, Line231, 0.08, contour);
            //Vector2[] Line232 = { v262, v261 };
            //fun.drawBLine(dxf, Line232, 0.08, contour);
            //Vector2[] Line233 = { v263, v260 };
            //fun.drawBLine(dxf, Line233, 0.08, contour);
            //Vector2[] Line234 = { v263, v264 };
            //fun.drawBLine(dxf, Line234, 0.08, contour);
            //Vector2[] Line235 = { v261, v264 };
            //fun.drawBLine(dxf, Line235, 0.08, contour);
            //Vector2[] Line236 = { v265, v264 };
            //fun.drawBLine(dxf, Line236, 0.08, contour);
            //Vector2[] Line237 = { v266, v265 };
            //fun.drawBLine(dxf, Line237, 0.08, contour);
            //Vector2[] Line238 = { v267, v268 };
            //fun.drawBLine(dxf, Line238, 0.08, contour);
            //LwPolyline Arc19 = new LwPolyline();
            //Arc19.Vertexes.Add(new LwPolylineVertex(v268));
            //Arc19.Vertexes.Add(new LwPolylineVertex(v269));
            //Arc19.Vertexes[0].Bulge = f / 1.6 * Math.Tan(par) / Math.Sin(par);
            //fun.PolyFill(dxf, Arc19, 0.08, contour);
            //Vector2[] Line239 = { v269, v270 };
            //fun.drawBLine(dxf, Line239, 0.08, contour);
            //Vector2[] Line240 = { v271, v270 };
            //fun.drawBLine(dxf, Line240, 0.08, contour);
            ////LwPolyline poly3 = new LwPolyline();
            ////poly3.Vertexes.Add(new LwPolylineVertex(fun.Polar(v272, 0, f / 1.6)));
            ////poly3.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            ////poly3.Vertexes.Add(new LwPolylineVertex(fun.Polar(v272, Math.PI, f / 1.6)));
            ////poly3.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            ////poly3.Vertexes.Add(new LwPolylineVertex(fun.Polar(v272, 0, f / 1.6)));
            ////fun.PolyFill(dxf, poly3, 0.08, contour);
            //LwPolyline poly4 = new LwPolyline();
            //poly4.Vertexes.Add(new LwPolylineVertex(fun.Polar(v273, 0, f / 1.3)));
            //poly4.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly4.Vertexes.Add(new LwPolylineVertex(fun.Polar(v273, Math.PI, f / 1.3)));
            //poly4.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly4.Vertexes.Add(new LwPolylineVertex(fun.Polar(v273, 0, f / 1.3)));
            //fun.PolyFill(dxf, poly4, 0.08, contour);
            //Vector2[] Line241 = { v266, v274 };
            //fun.drawBLine(dxf, Line241, 0.08, contour);
            //Vector2[] Line242 = { v275, v274 };
            //fun.drawBLine(dxf, Line242, 0.08, contour);
            //Vector2[] Line243 = { v275, v276 };
            //fun.drawBLine(dxf, Line243, 0.08, contour);
            //LwPolyline Arc20 = new LwPolyline();
            //Arc20.Vertexes.Add(new LwPolylineVertex(v275));
            //Arc20.Vertexes.Add(new LwPolylineVertex(v274));
            //Arc20.Vertexes[0].Bulge = -f / 1.2 * Math.Tan(par) / Math.Sin(par);
            //fun.PolyFill(dxf, Arc20, 0.08, contour);
            //LwPolyline Arc21 = new LwPolyline();
            //Arc21.Vertexes.Add(new LwPolylineVertex(v274));
            //Arc21.Vertexes.Add(new LwPolylineVertex(v277));
            //Arc21.Vertexes[0].Bulge = f / 8 * Math.Tan(par) / Math.Sin(par);
            //fun.PolyFill(dxf, Arc21, 0.08, contour);
            //Vector2[] Line244 = { v278, v277 };
            //fun.drawBLine(dxf, Line244, 0.08, contour);
            //Vector2[] Line245 = { v279, v280 };
            //fun.drawBLine(dxf, Line245, 0.06, contour);
            //Vector2[] Line246 = { v279, v281 };
            //fun.drawBLine(dxf, Line246, 0.06, contour);
            //Vector2[] Line247 = { v282, v271 };
            //fun.drawBLine(dxf, Line247, 0.08, contour);
            //Vector2[] Line248 = { v282, v283 };
            //fun.drawBLine(dxf, Line248, 0.08, contour);
            //Vector2[] Line249 = { v284, v283 };
            //fun.drawBLine(dxf, Line249, 0.08, contour);
            //Vector2[] Line250 = { v284, v285 };
            //fun.drawBLine(dxf, Line250, 0.08, contour);
            //Vector2[] Line251 = { v286, v285 };
            //fun.drawBLine(dxf, Line251, 0.08, contour);
            //Vector2[] Line252 = { v282, v287 };
            //fun.drawBLine(dxf, Line252, 0.08, contour);
            //Vector2[] Line253 = { v288, v287 };
            //fun.drawBLine(dxf, Line253, 0.08, contour);
            //Vector2[] Line254 = { v289, v290 };
            //fun.drawBLine(dxf, Line254, 0.08, contour);
            //Vector2[] Line255 = { v271, v291 };
            //fun.drawBLine(dxf, Line255, 0.08, contour);
            //Vector2[] Line256 = { v292, v291 };
            //fun.drawBLine(dxf, Line256, 0.08, contour);
            //Vector2[] Line257 = { v293, v294 };
            //fun.drawBLine(dxf, Line257, 0.08, contour);
            //Vector2[] Line258 = { v293, v295 };
            //fun.drawBLine(dxf, Line258, 0.08, contour);
            //Vector2[] Line259 = { v296, v295 };
            //fun.drawBLine(dxf, Line259, 0.08, contour);
            //Vector2[] Line260 = { v297, v295 };
            //fun.drawBLine(dxf, Line260, 0.08, contour);
            //Vector2[] Line261 = { v299, v295 };
            //fun.drawBLine(dxf, Line261, 0.08, contour);
            //Vector2[] Line262 = { v294, v298 };
            //fun.drawBLine(dxf, Line262, 0.08, contour);
            //Vector2[] Line263 = { v300, v294 };
            //fun.drawBLine(dxf, Line263, 0.08, contour);
            //LwPolyline Arc22 = new LwPolyline();
            //Arc22.Vertexes.Add(new LwPolylineVertex(v300));
            //Arc22.Vertexes.Add(new LwPolylineVertex(v301));
            //Arc22.Vertexes[0].Bulge = f / 1.5 * Math.Tan(par) / Math.Sin(par);
            //fun.PolyFill(dxf, Arc22, 0.08, contour);
            //Vector2[] Line264 = { v301, v302 };
            //fun.drawBLine(dxf, Line264, 0.08, contour);
            //Vector2[] Line265 = { v302, v303 };
            //fun.drawBLine(dxf, Line265, 0.12, contour);
            //Vector2[] Line266 = { v304, v302 };
            //fun.drawBLine(dxf, Line266, 0.08, contour);
            //Vector2[] Line267 = { v305, v306 };
            //fun.drawBLine(dxf, Line267, 0.08, contour);
            //Vector2[] Line268 = { v307, v304 };
            //fun.drawBLine(dxf, Line268, 0.08, contour);
            //LwPolyline Arc23 = new LwPolyline();
            //Arc23.Vertexes.Add(new LwPolylineVertex(v298));
            //Arc23.Vertexes.Add(new LwPolylineVertex(v251));
            //Arc23.Vertexes[0].Bulge = f / 1.5 * Math.Tan(par) / Math.Sin(par);
            //fun.PolyFill(dxf, Arc23, 0.08, contour);
            //Vector2[] Line269 = { v308, v304 };
            //fun.drawBLine(dxf, Line269, 0.08, contour);
            //Vector2[] Line270 = { v309, v310 };
            //fun.drawBLine(dxf, Line270, 0.12, contour);
            //Vector2[] Line271 = { v311, v312 };
            //fun.drawBLine(dxf, Line271, 0.08, contour);
            //Vector2[] Line272 = { v313, v314 };
            //fun.drawBLine(dxf, Line272, 0.12, contour);
            //Vector2[] Line273 = { v315, v316 };
            //fun.drawBLine(dxf, Line273, 0.08, contour);
            Vector2[] Line274 = { v317, v318 };
            fun.drawPlinetype(dxf, Line274, 0.1, refin, Linetype.Dashed);
            Vector2[] Line275 = { v319, v320 };
            fun.drawPlinetype(dxf, Line275, 0.1, refin, Linetype.Dashed);
            LwPolyline Arc24 = new LwPolyline();
            Arc24.Vertexes.Add(new LwPolylineVertex(v317));
            Arc24.Vertexes.Add(new LwPolylineVertex(v320));
            Arc24.Vertexes[0].Bulge = f / 1.5 * Math.Tan(par) / Math.Sin(par);
            fun.PolyFillandlinetype(dxf, Arc24, 0.1, refin, Linetype.Dashed);
            LwPolyline Arc25 = new LwPolyline();
            Arc25.Vertexes.Add(new LwPolylineVertex(v318));
            Arc25.Vertexes.Add(new LwPolylineVertex(v319));
            Arc25.Vertexes[0].Bulge = -f / 1.5 * Math.Tan(par) / Math.Sin(par);
            fun.PolyFillandlinetype(dxf, Arc25, 0.1,  refin, Linetype.Dashed);
            Vector2[] Line276 = { v322, v321 };
            fun.drawPlinetype(dxf, Line276, 0.1, refin, Linetype.Dashed);
            Vector2[] Line277 = { v323, v324 };
            fun.drawPlinetype(dxf, Line277, 0.1, refin, Linetype.Dashed);
            Vector2[] Line278 = { v325, v322 };
            fun.drawPlinetype(dxf, Line278, 0.1, refin, Linetype.Dashed);
            Vector2[] Line279 = { v326, v324 };
            fun.drawPlinetype(dxf, Line279, 0.1, refin, Linetype.Dashed);
            Vector2[] Line1 = { v328, v329 };
            fun.drawPlinetype(dxf, Line1, 0.1, refin, Linetype.Dashed);
            Vector2[] Line2 = { v331, v330 };
            fun.drawPlinetype(dxf, Line2, 0.1, refin, Linetype.Dashed);
            Vector2[] Line3 = { v325, v332 };
            fun.drawPlinetype(dxf, Line3, 0.1, refin, Linetype.Dashed);
            Vector2[] Line4 = { v333, v326 };
            fun.drawPlinetype(dxf, Line4, 0.1, refin, Linetype.Dashed);
            //Vector2[] Line280 = { v327, v326 };
            //fun.drawBLine(dxf, Line280, 0.08, contour);
            //DimensionStyle dimensionStyle = fun.CreateDimStyle();
            //dimensionStyle.ArrowSize = 1;
            //dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.TextHeight = 1.8;
            //double offset = 6;
            //LinearDimension dim6 = new LinearDimension(new Line(v226, v227), offset * 6, 90, dimensionStyle);
            //dim6.UserText = "Φ62 ";
            //dxf.AddEntity(dim6);
            //LinearDimension dim7 = new LinearDimension(new Line(v241, v246), offset * 4, 270, dimensionStyle);
            //dim7.UserText = "Φ92 ";
            //dxf.AddEntity(dim7);
            //LinearDimension dim8 = new LinearDimension(new Line(v248, v251), offset * 2, 270, dimensionStyle);
            //dim8.UserText = "Φ80 ";
            //dxf.AddEntity(dim8);
            //LinearDimension dim9 = new LinearDimension(new Line(v227, v248), offset * 6, 0, dimensionStyle);
            //dim9.UserText = "（50） ";
            //dxf.AddEntity(dim9);
            //LinearDimension dim10 = new LinearDimension(new Line(v246, v248), offset * 1.6, 0, dimensionStyle);
            //dim10.UserText = "6 ";
            //dxf.AddEntity(dim10);
            //Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v246, v256), new Line(v248, v257), offset * 3, dimensionStyle);
            //angdim1.UserText = "45°";
            //dxf.AddEntity(angdim1);
            //LinearDimension dim11 = new LinearDimension(new Line(v317, v318), offset * 6, 90, dimensionStyle);
            //dim11.UserText = "Φ27H7 ";
            //dxf.AddEntity(dim11);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v225.X - f * 6, v225.Y), new Vector2(v225.X + f * 2 + r * 3, v225.Y) }, centre, Linetype.Center);
            //
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint11(Dictionary<string, Object> data)     //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double r = 13.5;
            double r1 = 30;
            double f = 1;
            double pi = Math.PI;
            double par = 28 * pi / 180;
            string path = Convert.ToString(data["path"]);
            //主视图
            //图三
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v225 = new Vector2(v1.X + r1, v1.Y);
            Vector2 v226 = new Vector2(v225.X, v225.Y - r - r / 1.3);
            Vector2 v227 = new Vector2(v225.X, v225.Y + r + r / 1.3);
            //
            Vector2 v228 = new Vector2(v226.X + r, v226.Y);
            Vector2 v229 = new Vector2(v227.X + r, v227.Y);
            //虚线前端口
            Vector2 v230 = new Vector2(v229.X + f * 2, v229.Y + f);
            Vector2 v231 = new Vector2(v228.X + f * 2, v228.Y - f);
            //半段虚线
            Vector2 v232 = new Vector2(v226.X + r / 2, v226.Y);
            Vector2 v233 = new Vector2(v226.X + r / 2, v226.Y + (r + r / 1.3) / 2);
            Vector2 v234 = new Vector2(v227.X + r / 2, v227.Y);
            Vector2 v235 = new Vector2(v227.X + r / 2, v227.Y - (r + r / 1.3) / 2);
            //斜边
            Vector2 v236 = new Vector2(v230.X + r + f, v230.Y + f * 6);
            //
            Vector2 v237 = new Vector2(v231.X + r + f, v231.Y - f * 6);
            //
            Vector2 v238 = new Vector2(v236.X + f * 3, v236.Y + f / 3.8);
            Vector2 v239 = new Vector2(v237.X + f * 3, v237.Y - f / 3.8);
            //下半部得横向
            Vector2 v240 = new Vector2(v238.X + f * 6, v238.Y - f * 2);
            Vector2 v241 = new Vector2(v237.X + f * 6, v237.Y);
            //
            Vector2 v242 = new Vector2(v236.X + f * 5, v236.Y + f * 1.6);
            Vector2 v243 = new Vector2(v242.X + f * 1.6, v242.Y + f / 4.6);
            Vector2 v244 = new Vector2(v243.X + f, v243.Y);
            //
            Vector2 v245 = new Vector2(v244.X - f * 2.6, v244.Y - f * 2.2);
            //
            Vector2 v246 = new Vector2(v244.X + f * 0.5, v244.Y + f * 0.2);
            Vector2 v247 = new Vector2(v246.X + f * 1.5, v246.Y - f * 1.42);
            Vector2 v248 = new Vector2(v247.X + f * 0.3, v247.Y - f * 0.5);
            Vector2 v249 = new Vector2(v248.X - f * 0.9, v248.Y - f * 1.8);
            //
            Vector2 v250 = new Vector2(v249.X, v249.Y - f);
            Vector2 v251 = new Vector2(v248.X, v248.Y - r1 * 2);
            //
            Vector2 v252 = new Vector2(v250.X + f * 4 / 5, v250.Y - f - f / 5);
            //
            Vector2 v253 = new Vector2(v238.X + f * 2 + (f * 2), v238.Y - (f * 2) + f / 1.5);
            Vector2 v254 = new Vector2(v238.X + f * 2 + (f * 2) * 1.5, v238.Y - (f * 2) + f / 3);
            //
            Vector2 v255 = new Vector2(v254.X, v254.Y - r / 1.3);
            //
            Vector2 v256 = new Vector2(v246.X - r + f / 2, v246.Y + r - f * 2);
            Vector2 v257 = new Vector2(v248.X, v248.Y + r + f * 6);
            //
            Vector2 v258 = new Vector2(v255.X + f / 3, v255.Y);
            Vector2 v259 = new Vector2(v258.X + f + f / 2, v258.Y - f);
            Vector2 v260 = new Vector2(v255.X - f / 3, v255.Y);
            Vector2 v261 = new Vector2(v260.X + f / 5, v260.Y - f * 7 / 10);
            Vector2 v262 = new Vector2(v261.X + f * 2, v261.Y - f - f / 2);
            Vector2 v263 = new Vector2(v260.X - f * 2 - f * 3 / 5, v260.Y - f * 2 - f / 5);
            Vector2 v264 = new Vector2(v263.X - f / 5, v263.Y - f);
            Vector2 v265 = new Vector2(v264.X + f * 3, v264.Y - f * 2 - f * 7 / 10);
            Vector2 v266 = new Vector2(v265.X + f * 2, v265.Y + f * 2);
            //前端圆弧
            Vector2 v267 = new Vector2(v260.X - f * 2 - f * 3 / 8, v260.Y - f * 2);
            Vector2 v268 = new Vector2(v267.X - f * 5, v267.Y + f * 1.8);
            Vector2 v269 = new Vector2(v268.X - f * 3.9, v268.Y - f * 3 - f);
            Vector2 v270 = new Vector2(v269.X + f * 3.6, v269.Y - r / 1.6);
            Vector2 v271 = new Vector2(v270.X + f * 6.6, v270.Y - f * 9);
            //圆心
            Vector2 v272 = new Vector2(v260.X, v260.Y - f * 3);
            Vector2 v273 = new Vector2(v272.X - f * 4.6, v272.Y - f * 5);
            //新图下方
            Vector2 v274 = new Vector2(v266.X - f - f / 2, v266.Y - f * 2.6);
            Vector2 v275 = new Vector2(v274.X + f * 6 / 10, v274.Y - f * 3 / 5);
            Vector2 v276 = new Vector2(v275.X + f * 9 / 10, v275.Y + f + f * 6 / 10);
            //下圆链接
            Vector2 v277 = new Vector2(v265.X + f / 2, v265.Y - f * 1.5);
            Vector2 v278 = new Vector2(v277.X + f + f / 2, v277.Y - r + f * 2);
            //虚线后
            Vector2 v279 = new Vector2(v277.X, v277.Y + f / 9);
            Vector2 v280 = new Vector2(v279.X + f * 1.5, v279.Y);
            Vector2 v281 = new Vector2(v279.X - f * 2.6, v279.Y);
            //中心线下面
            Vector2 v282 = new Vector2(v271.X + f * 1.5, v271.Y);
            Vector2 v283 = new Vector2(v282.X, v282.Y + f + f / 2);
            Vector2 v284 = new Vector2(v283.X - f / 2, v283.Y + f * 3 / 5);
            Vector2 v285 = new Vector2(v284.X + f / 5, v284.Y + f * 4 / 5);
            Vector2 v286 = new Vector2(v285.X + f * 2.07, v285.Y - f / 2);
            Vector2 v287 = new Vector2(v282.X, v282.Y - f * 3);
            Vector2 v288 = new Vector2(v287.X + f * 1.8, v287.Y);
            Vector2 v289 = new Vector2(v282.X, v282.Y - f * 2);
            Vector2 v290 = new Vector2(v289.X + f * 1.8, v289.Y);
            Vector2 v291 = new Vector2(v271.X, v271.Y - f * 8);
            Vector2 v292 = new Vector2(v271.X + f * 3.3, v291.Y);
            Vector2 v293 = new Vector2(v271.X + f * 1.2, v292.Y);
            //待修改
            Vector2 v294 = new Vector2(v293.X - f * 2, v293.Y - f * 2 - f * 2);
            Vector2 v295 = new Vector2(v293.X - f * 0.6, v293.Y - f * 2.5 - f * 1.5);
            Vector2 v296 = new Vector2(v295.X + f * 2.66, v295.Y);
            Vector2 v297 = new Vector2(v295.X + f * 2.66, v295.Y - f * 2);
            //待修改
            Vector2 v298 = new Vector2(v294.X + f * 4, v294.Y - r + f * 3);
            Vector2 v299 = new Vector2(v295.X - f * 1.4, v295.Y);
            //竖线点
            Vector2 v300 = new Vector2(v294.X - f * 9.5, v294.Y + f * 4.7);
            //
            Vector2 v301 = new Vector2(v300.X - f * 3, v300.Y - f * 3.4);
            //
            Vector2 v302 = new Vector2(v301.X + f * 5.8, v301.Y - f * 11.8);
            //竖线1
            Vector2 v303 = new Vector2(v302.X, v302.Y - f * 5.4);
            //
            Vector2 v304 = new Vector2(v302.X + f * 6.75, v302.Y - f * 2.88);
            //竖线2
            Vector2 v305 = new Vector2(v302.X + f * 2, v302.Y - f * 0.9);
            Vector2 v306 = new Vector2(v305.X, v305.Y - f * 4.9);
            //
            Vector2 v307 = new Vector2(v304.X, v304.Y - f * 2.9);
            Vector2 v308 = new Vector2(v304.X + f * 2.46, v304.Y + f * 0.9);
            //竖线3组
            Vector2 v309 = new Vector2(v302.X, v300.Y - f * 1.3);
            Vector2 v310 = new Vector2(v302.X, v309.Y + r + f * 6);
            //
            Vector2 v311 = new Vector2(v305.X, v310.Y - f * 3.68);
            Vector2 v312 = new Vector2(v311.X, v311.Y - r - f * 3.29);
            //竖线4组
            Vector2 v313 = new Vector2(v302.X, v309.Y + r + f * 6 + f * 10.78);
            Vector2 v314 = new Vector2(v302.X, v313.Y + f * 11.38);
            //
            Vector2 v315 = new Vector2(v305.X, v310.Y + f * 10.2);
            Vector2 v316 = new Vector2(v315.X, v315.Y + f * 12.6);
            //虚线
            Vector2 v317 = new Vector2(v233.X + f * 10, v233.Y);
            Vector2 v318 = new Vector2(v317.X, v235.Y);
            //
            Vector2 v319 = new Vector2(v317.X + f, v318.Y);
            Vector2 v320 = new Vector2(v317.X + f, v317.Y);
            //
            Vector2 v321 = new Vector2(v319.X, v319.Y - f * 5);
            Vector2 v322 = new Vector2(v319.X + r + f * 4.5, v321.Y);
            //
            Vector2 v323 = new Vector2(v320.X, v320.Y + f * 6);
            Vector2 v324 = new Vector2(v319.X + r + f * 4.5, v323.Y);
            //
            Vector2 v325 = new Vector2(v322.X, v322.Y + f * 4.6);
            Vector2 v326 = new Vector2(v324.X, v324.Y - f * 3.6);
            Vector2 v327 = new Vector2(v324.X + f * 4.1, v324.Y - f * 3.6);
            //
            Vector2 v328 = new Vector2(v233.X - f * 6, v233.Y);
            Vector2 v329 = new Vector2(v233.X + f * 10, v233.Y);
            //
            Vector2 v330 = new Vector2(v235.X - f * 6, v235.Y);
            Vector2 v331 = new Vector2(v235.X + f * 10, v235.Y);
            //
            Vector2 v332 = new Vector2(v325.X + f * 6, v325.Y);
            Vector2 v333 = new Vector2(v326.X + f * 6, v326.Y);
            // 线段
            //主视图
            //图三
            //Vector2[] Line199 = { v225, v226 };
            //fun.drawBLine(dxf, Line199, 0.08, contour);
            //Vector2[] Line200 = { v225, v227 };
            //fun.drawBLine(dxf, Line200, 0.08, contour);
            //Vector2[] Line201 = { v226, v228 };
            //fun.drawBLine(dxf, Line201, 0.08, contour);
            //Vector2[] Line202 = { v227, v229 };
            //fun.drawBLine(dxf, Line202, 0.08, contour);
            //Vector2[] Line203 = { v228, v229 };
            //fun.drawBLine(dxf, Line203, 0.08, contour);
            //Vector2[] Line204 = { v230, v229 };
            //fun.drawBLine(dxf, Line204, 0.08, contour);
            ////虚线前
            //Vector2[] Line205 = { v231, v228 };
            //fun.drawBLine(dxf, Line205, 0.08, contour);
            //Vector2[] Line206 = { v231, v230 };
            //fun.drawBLine(dxf, Line206, 0.08, contour);
            //
            //Vector2[] Line207 = { v232, v233 };
            //fun.drawPlinetype(dxf, Line207, refin, Linetype.Dashed);
            //Vector2[] Line208 = { v234, v235 };
            //fun.drawPlinetype(dxf, Line208, refin, Linetype.Dashed);
            //
            //Vector2[] Line209 = { v230, v236 };
            //fun.drawBLine(dxf, Line209, 0.08, contour);
            //Vector2[] Line210 = { v231, v237 };
            //fun.drawBLine(dxf, Line210, 0.08, contour);
            //
            //LwPolyline Arc16 = new LwPolyline();
            //Arc16.Vertexes.Add(new LwPolylineVertex(v236));
            //Arc16.Vertexes.Add(new LwPolylineVertex(v238));
            //Arc16.Vertexes[0].Bulge = -f / 8 * Math.Tan(par) / Math.Sin(par);
            //fun.PolyFill(dxf, Arc16, 0.08, contour);
            ////LwPolyline Arc17 = new LwPolyline();
            ////Arc17.Vertexes.Add(new LwPolylineVertex(v237));
            ////Arc17.Vertexes.Add(new LwPolylineVertex(v239));
            ////Arc17.Vertexes[0].Bulge = f / 6 * Math.Tan(par) / Math.Sin(par);
            ////fun.PolyFill(dxf, Arc17, 0.08, contour);
            //Vector2[] Line211 = { v240, v238 };
            //fun.drawBLine(dxf, Line211, 0.08, contour);
            //Vector2[] Line212 = { v237, v241 };
            //fun.drawBLine(dxf, Line212, 0.08, contour);
            //Vector2[] Line213 = { v236, v242 };
            //fun.drawBLine(dxf, Line213, 0.08, contour);
            //LwPolyline Arc17 = new LwPolyline();
            //Arc17.Vertexes.Add(new LwPolylineVertex(v242));
            //Arc17.Vertexes.Add(new LwPolylineVertex(v243));
            //Arc17.Vertexes[0].Bulge = -f / 12 * Math.Tan(par) / Math.Sin(par);
            //fun.PolyFill(dxf, Arc17, 0.08, contour);
            //Vector2[] Line214 = { v243, v244 };
            //fun.drawBLine(dxf, Line214, 0.08, contour);
            //Vector2[] Line215 = { v245, v244 };
            //fun.drawBLine(dxf, Line215, 0.08, contour);
            //Vector2[] Line216 = { v244, v246 };
            //fun.drawBLine(dxf, Line216, 0.08, contour);
            //Vector2[] Line217 = { v247, v246 };
            //fun.drawBLine(dxf, Line217, 0.08, contour);
            //Vector2[] Line218 = { v247, v248 };
            //fun.drawBLine(dxf, Line218, 0.08, contour);
            //Vector2[] Line219 = { v249, v248 };
            //fun.drawBLine(dxf, Line219, 0.08, contour);
            //Vector2[] Line220 = { v249, v250 };
            //fun.drawBLine(dxf, Line220, 0.08, contour);
            //Vector2[] Line221 = { v248, v251 };
            //fun.drawBLine(dxf, Line221, 0.08, contour);
            //Vector2[] Line222 = { v241, v251 };
            //fun.drawBLine(dxf, Line222, 0.08, contour);
            //Vector2[] Line223 = { v250, v252 };
            //fun.drawBLine(dxf, Line223, 0.08, contour);
            ////LwPolyline Arc18 = new LwPolyline();
            ////Arc18.Vertexes.Add(new LwPolylineVertex(v253));
            ////Arc18.Vertexes.Add(new LwPolylineVertex(v254));
            ////Arc18.Vertexes[0].Bulge = -f * Math.Tan(par) / Math.Sin(par);
            ////fun.PolyFill(dxf, Arc18, 0.08, contour);
            //Vector2[] Line224 = { v254, v255 };
            //fun.drawBLine(dxf, Line224, 0.08, contour);
            //Vector2[] Line225 = { v256, v246 };
            //fun.drawBLine(dxf, Line225, 0.08, skdimensioning);
            //Vector2[] Line226 = { v257, v248 };
            //fun.drawBLine(dxf, Line226, 0.08, skdimensioning);
            //中间
            //Vector2[] Line227 = { v258, v255 };
            //fun.drawBLine(dxf, Line227, 0.08, contour);
            //Vector2[] Line228 = { v258, v259 };
            //fun.drawBLine(dxf, Line228, 0.08, contour);
            //Vector2[] Line229 = { v260, v255 };
            //fun.drawBLine(dxf, Line229, 0.08, contour);
            //Vector2[] Line230 = { v260, v261 };
            //fun.drawBLine(dxf, Line230, 0.08, contour);
            //Vector2[] Line231 = { v258, v261 };
            //fun.drawBLine(dxf, Line231, 0.08, contour);
            //Vector2[] Line232 = { v262, v261 };
            //fun.drawBLine(dxf, Line232, 0.08, contour);
            //Vector2[] Line233 = { v263, v260 };
            //fun.drawBLine(dxf, Line233, 0.08, contour);
            //Vector2[] Line234 = { v263, v264 };
            //fun.drawBLine(dxf, Line234, 0.08, contour);
            //Vector2[] Line235 = { v261, v264 };
            //fun.drawBLine(dxf, Line235, 0.08, contour);
            //Vector2[] Line236 = { v265, v264 };
            //fun.drawBLine(dxf, Line236, 0.08, contour);
            //Vector2[] Line237 = { v266, v265 };
            //fun.drawBLine(dxf, Line237, 0.08, contour);
            //Vector2[] Line238 = { v267, v268 };
            //fun.drawBLine(dxf, Line238, 0.08, contour);
            //LwPolyline Arc19 = new LwPolyline();
            //Arc19.Vertexes.Add(new LwPolylineVertex(v268));
            //Arc19.Vertexes.Add(new LwPolylineVertex(v269));
            //Arc19.Vertexes[0].Bulge = f / 1.6 * Math.Tan(par) / Math.Sin(par);
            //fun.PolyFill(dxf, Arc19, 0.08, contour);
            //Vector2[] Line239 = { v269, v270 };
            //fun.drawBLine(dxf, Line239, 0.08, contour);
            //Vector2[] Line240 = { v271, v270 };
            //fun.drawBLine(dxf, Line240, 0.08, contour);
            ////LwPolyline poly3 = new LwPolyline();
            ////poly3.Vertexes.Add(new LwPolylineVertex(fun.Polar(v272, 0, f / 1.6)));
            ////poly3.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            ////poly3.Vertexes.Add(new LwPolylineVertex(fun.Polar(v272, Math.PI, f / 1.6)));
            ////poly3.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            ////poly3.Vertexes.Add(new LwPolylineVertex(fun.Polar(v272, 0, f / 1.6)));
            ////fun.PolyFill(dxf, poly3, 0.08, contour);
            //LwPolyline poly4 = new LwPolyline();
            //poly4.Vertexes.Add(new LwPolylineVertex(fun.Polar(v273, 0, f / 1.3)));
            //poly4.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly4.Vertexes.Add(new LwPolylineVertex(fun.Polar(v273, Math.PI, f / 1.3)));
            //poly4.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly4.Vertexes.Add(new LwPolylineVertex(fun.Polar(v273, 0, f / 1.3)));
            //fun.PolyFill(dxf, poly4, 0.08, contour);
            //Vector2[] Line241 = { v266, v274 };
            //fun.drawBLine(dxf, Line241, 0.08, contour);
            //Vector2[] Line242 = { v275, v274 };
            //fun.drawBLine(dxf, Line242, 0.08, contour);
            //Vector2[] Line243 = { v275, v276 };
            //fun.drawBLine(dxf, Line243, 0.08, contour);
            //LwPolyline Arc20 = new LwPolyline();
            //Arc20.Vertexes.Add(new LwPolylineVertex(v275));
            //Arc20.Vertexes.Add(new LwPolylineVertex(v274));
            //Arc20.Vertexes[0].Bulge = -f / 1.2 * Math.Tan(par) / Math.Sin(par);
            //fun.PolyFill(dxf, Arc20, 0.08, contour);
            //LwPolyline Arc21 = new LwPolyline();
            //Arc21.Vertexes.Add(new LwPolylineVertex(v274));
            //Arc21.Vertexes.Add(new LwPolylineVertex(v277));
            //Arc21.Vertexes[0].Bulge = f / 8 * Math.Tan(par) / Math.Sin(par);
            //fun.PolyFill(dxf, Arc21, 0.08, contour);
            //Vector2[] Line244 = { v278, v277 };
            //fun.drawBLine(dxf, Line244, 0.08, contour);
            //Vector2[] Line245 = { v279, v280 };
            //fun.drawBLine(dxf, Line245, 0.06, contour);
            //Vector2[] Line246 = { v279, v281 };
            //fun.drawBLine(dxf, Line246, 0.06, contour);
            //Vector2[] Line247 = { v282, v271 };
            //fun.drawBLine(dxf, Line247, 0.08, contour);
            //Vector2[] Line248 = { v282, v283 };
            //fun.drawBLine(dxf, Line248, 0.08, contour);
            //Vector2[] Line249 = { v284, v283 };
            //fun.drawBLine(dxf, Line249, 0.08, contour);
            //Vector2[] Line250 = { v284, v285 };
            //fun.drawBLine(dxf, Line250, 0.08, contour);
            //Vector2[] Line251 = { v286, v285 };
            //fun.drawBLine(dxf, Line251, 0.08, contour);
            //Vector2[] Line252 = { v282, v287 };
            //fun.drawBLine(dxf, Line252, 0.08, contour);
            //Vector2[] Line253 = { v288, v287 };
            //fun.drawBLine(dxf, Line253, 0.08, contour);
            //Vector2[] Line254 = { v289, v290 };
            //fun.drawBLine(dxf, Line254, 0.08, contour);
            //Vector2[] Line255 = { v271, v291 };
            //fun.drawBLine(dxf, Line255, 0.08, contour);
            //Vector2[] Line256 = { v292, v291 };
            //fun.drawBLine(dxf, Line256, 0.08, contour);
            //Vector2[] Line257 = { v293, v294 };
            //fun.drawBLine(dxf, Line257, 0.08, contour);
            //Vector2[] Line258 = { v293, v295 };
            //fun.drawBLine(dxf, Line258, 0.08, contour);
            //Vector2[] Line259 = { v296, v295 };
            //fun.drawBLine(dxf, Line259, 0.08, contour);
            //Vector2[] Line260 = { v297, v295 };
            //fun.drawBLine(dxf, Line260, 0.08, contour);
            //Vector2[] Line261 = { v299, v295 };
            //fun.drawBLine(dxf, Line261, 0.08, contour);
            //Vector2[] Line262 = { v294, v298 };
            //fun.drawBLine(dxf, Line262, 0.08, contour);
            //Vector2[] Line263 = { v300, v294 };
            //fun.drawBLine(dxf, Line263, 0.08, contour);
            //LwPolyline Arc22 = new LwPolyline();
            //Arc22.Vertexes.Add(new LwPolylineVertex(v300));
            //Arc22.Vertexes.Add(new LwPolylineVertex(v301));
            //Arc22.Vertexes[0].Bulge = f / 1.5 * Math.Tan(par) / Math.Sin(par);
            //fun.PolyFill(dxf, Arc22, 0.08, contour);
            //Vector2[] Line264 = { v301, v302 };
            //fun.drawBLine(dxf, Line264, 0.08, contour);
            //Vector2[] Line265 = { v302, v303 };
            //fun.drawBLine(dxf, Line265, 0.12, contour);
            //Vector2[] Line266 = { v304, v302 };
            //fun.drawBLine(dxf, Line266, 0.08, contour);
            //Vector2[] Line267 = { v305, v306 };
            //fun.drawBLine(dxf, Line267, 0.08, contour);
            //Vector2[] Line268 = { v307, v304 };
            //fun.drawBLine(dxf, Line268, 0.08, contour);
            //LwPolyline Arc23 = new LwPolyline();
            //Arc23.Vertexes.Add(new LwPolylineVertex(v298));
            //Arc23.Vertexes.Add(new LwPolylineVertex(v251));
            //Arc23.Vertexes[0].Bulge = f / 1.5 * Math.Tan(par) / Math.Sin(par);
            //fun.PolyFill(dxf, Arc23, 0.08, contour);
            //Vector2[] Line269 = { v308, v304 };
            //fun.drawBLine(dxf, Line269, 0.08, contour);
            //Vector2[] Line270 = { v309, v310 };
            //fun.drawBLine(dxf, Line270, 0.12, contour);
            //Vector2[] Line271 = { v311, v312 };
            //fun.drawBLine(dxf, Line271, 0.08, contour);
            //Vector2[] Line272 = { v313, v314 };
            //fun.drawBLine(dxf, Line272, 0.12, contour);
            //Vector2[] Line273 = { v315, v316 };
            //fun.drawBLine(dxf, Line273, 0.08, contour);
            //Vector2[] Line274 = { v317, v318 };
            //fun.drawPlinetype(dxf, Line274, refin, Linetype.Dashed);
            //Vector2[] Line275 = { v319, v320 };
            //fun.drawPlinetype(dxf, Line275, refin, Linetype.Dashed);
            //LwPolyline Arc24 = new LwPolyline();
            //Arc24.Vertexes.Add(new LwPolylineVertex(v317));
            //Arc24.Vertexes.Add(new LwPolylineVertex(v320));
            //Arc24.Vertexes[0].Bulge = f / 1.5 * Math.Tan(par) / Math.Sin(par);
            //fun.PolyFillandlinetype(dxf, Arc24, 0.08, refin, Linetype.Dashed);
            //LwPolyline Arc25 = new LwPolyline();
            //Arc25.Vertexes.Add(new LwPolylineVertex(v318));
            //Arc25.Vertexes.Add(new LwPolylineVertex(v319));
            //Arc25.Vertexes[0].Bulge = -f / 1.5 * Math.Tan(par) / Math.Sin(par);
            //fun.PolyFillandlinetype(dxf, Arc25, 0.08, refin, Linetype.Dashed);
            //Vector2[] Line276 = { v322, v321 };
            //fun.drawPlinetype(dxf, Line276, refin, Linetype.Dashed);
            //Vector2[] Line277 = { v323, v324 };
            //fun.drawPlinetype(dxf, Line277, refin, Linetype.Dashed);
            //Vector2[] Line278 = { v325, v322 };
            //fun.drawPlinetype(dxf, Line278, refin, Linetype.Dashed);
            //Vector2[] Line279 = { v326, v324 };
            //fun.drawPlinetype(dxf, Line279, refin, Linetype.Dashed);
            //Vector2[] Line1 = { v328, v329 };
            //fun.drawPlinetype(dxf, Line1, refin, Linetype.Dashed);
            //Vector2[] Line2 = { v331, v330 };
            //fun.drawPlinetype(dxf, Line2, refin, Linetype.Dashed);
            //Vector2[] Line3 = { v325, v332 };
            //fun.drawPlinetype(dxf, Line3, refin, Linetype.Dashed);
            //Vector2[] Line4 = { v333, v326 };
            //fun.drawPlinetype(dxf, Line4, refin, Linetype.Dashed);
            //Vector2[] Line280 = { v327, v326 };
            //fun.drawBLine(dxf, Line280, 0.08, contour);
            //DimensionStyle dimensionStyle = fun.CreateDimStyle();
            //dimensionStyle.ArrowSize = 1;
            //dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.TextHeight = 1.8;
            //double offset = 6;
            //LinearDimension dim6 = new LinearDimension(new Line(v226, v227), offset * 6, 90, dimensionStyle);
            //dim6.UserText = "Φ62 ";
            //dxf.AddEntity(dim6);
            //LinearDimension dim7 = new LinearDimension(new Line(v241, v246), offset * 4, 270, dimensionStyle);
            //dim7.UserText = "Φ92 ";
            //dxf.AddEntity(dim7);
            //LinearDimension dim8 = new LinearDimension(new Line(v248, v251), offset * 2, 270, dimensionStyle);
            //dim8.UserText = "Φ80 ";
            //dxf.AddEntity(dim8);
            //LinearDimension dim9 = new LinearDimension(new Line(v227, v248), offset * 6, 0, dimensionStyle);
            //dim9.UserText = "（50） ";
            //dxf.AddEntity(dim9);
            //LinearDimension dim10 = new LinearDimension(new Line(v246, v248), offset * 1.6, 0, dimensionStyle);
            //dim10.UserText = "6 ";
            //dxf.AddEntity(dim10);
            //Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v246, v256), new Line(v248, v257), offset * 3, dimensionStyle);
            //angdim1.UserText = "45°";
            //dxf.AddEntity(angdim1);
            //LinearDimension dim11 = new LinearDimension(new Line(v317, v318), offset * 6, 90, dimensionStyle);
            //dim11.UserText = "Φ27H7 ";
            //dxf.AddEntity(dim11);
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v225.X - f * 6, v225.Y), new Vector2(v225.X + f * 2 + r * 3, v225.Y) },0.08, centre, Linetype.Center);
            //
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }

        //
        //
        public static void Matingpoint12(Dictionary<string, Object> data)   //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 20;
            double pi = Math.PI;
            double par = 93 * pi / 180;
            double l = 180;
            double l1 = 30;
            string path = Convert.ToString(data["path"]);
            //主视图
            //图三
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h / 2 - h / 8);
            Vector2 v3 = new Vector2(v1.X, v1.Y - h / 2 + h / 8);
            Vector2 v4 = new Vector2(v2.X + (h / 8) / Math.Tan(par / 2), v2.Y + h / 8 + h / 30);
            Vector2 v5 = new Vector2(v4.X, v4.Y - h / 4);
            Vector2 v6 = new Vector2(v5.X - (h / 8) / Math.Tan(par / 2), v5.Y - h / 8);
            Vector2 v7 = new Vector2(v3.X + (h / 8) / Math.Tan(par / 2), v3.Y - h / 8 - h / 30);
            Vector2 v8 = new Vector2(v7.X, v7.Y + h / 4);
            Vector2 v9 = new Vector2(v8.X - (h / 8) / Math.Tan(par / 2), v8.Y + h / 8);
            //
            Vector2 v10 = new Vector2(v5.X - ((h / 8) / Math.Tan(par / 2)) / 2, v5.Y - (h / 8) / 2);
            Vector2 v11 = new Vector2(v8.X - ((h / 8) / Math.Tan(par / 2)) / 2, v8.Y + (h / 8) / 2);
            //
            Vector2 v12 = new Vector2(v7.X + l - (h / 8) / Math.Tan(par / 2) - l1, v3.Y - h / 8);
            Vector2 v13 = new Vector2(v8.X + l - (h / 8) / Math.Tan(par / 2) - l1, v8.Y);
            Vector2 v14 = new Vector2(v4.X + l - (h / 8) / Math.Tan(par / 2) - l1, v2.Y + h / 8);
            Vector2 v15 = new Vector2(v5.X + l - (h / 8) / Math.Tan(par / 2) - l1, v5.Y);
            //前端刀口
            Vector2 v16 = new Vector2(v12.X, v12.Y + h / 3.3);
            Vector2 v17 = new Vector2(v14.X, v2.Y + h / 8 + h / 30 - h / 3.3);
            Vector2 v18 = new Vector2(v16.X + h / 20, v16.Y);
            Vector2 v19 = new Vector2(v17.X + h / 20, v17.Y);
            //
            Vector2 v20 = new Vector2(v12.X + l1 / 3, v12.Y);
            Vector2 v21 = new Vector2(v14.X + l1 / 3, v2.Y + h / 8);
            Vector2 v22 = new Vector2(v21.X + l1 / 3, v21.Y);
            Vector2 v23 = new Vector2(v22.X + l1 / 3, v22.Y - h / 2 + h / 10);
            Vector2 v24 = new Vector2(v23.X, v23.Y - h / 5);
            //
            Vector2 v25 = new Vector2(v24.X + h / 20, v24.Y + h / 28);
            //
            Vector2 v26 = new Vector2(v20.X + h / 2 + h / 20 + (h / 20) * 2 / 5, v20.Y - h / 20 - (h / 20) * 7 / 10);
            Vector2 v27 = new Vector2(v26.X + l1 / 3 - h / 12, v26.Y);
            //
            Vector2 v28 = new Vector2(v25.X + h / 60, v27.Y - h / 26);
            //
            Vector2 v29 = new Vector2(v25.X - h / 2 + h / 16, v25.Y - (h / 20) * 6 - (h / 20) * 3 / 10);
            //
            Vector2 v30 = new Vector2(v28.X + h / 2, v28.Y);
            //
            Vector2 v31 = new Vector2(v25.X - (h / 20) / 10, v25.Y + (h / 20) * 7);
            //
            Vector2 v32 = new Vector2(v28.X + h / 2, v1.Y);
            //
            Vector2 v33 = new Vector2(v14.X - h / 16, v4.Y);
            //X
            Vector2 v34 = new Vector2(v7.X + l - (h / 8) / Math.Tan(par / 2) - l1 + h / 5.56, v7.Y + h / 4);
            //
            Vector2 v35 = new Vector2(v4.X + l - (h / 8) / Math.Tan(par / 2) - l1, v4.Y);
            Vector2 v36 = new Vector2(v7.X + l - (h / 8) / Math.Tan(par / 2) - l1, v7.Y);
            // 线段
            //主视图

            Vector2[] Line1 = { v2, v3 };
            fun.drawBLine(dxf, Line1, 0.12, contour);
            Vector2[] Line2 = { v2, v4 };
            fun.drawBLine(dxf, Line2, 0.12, contour);
            Vector2[] Line3 = { v5, v4 };
            fun.drawBLine(dxf, Line3, 0.12, contour);
            //Vector2[] Line4 = { v5, v6 };
            //fun.drawBLine(dxf, Line4, 0.12, contour);
            Vector2[] Line5 = { v7, v3 };
            fun.drawBLine(dxf, Line5, 0.12, contour);
            Vector2[] Line6 = { v7, v8 };
            fun.drawBLine(dxf, Line6, 0.12, contour);
            //Vector2[] Line7 = { v9, v8 };
            //fun.drawBLine(dxf, Line7, 0.12, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            Arc1.Vertexes.Add(new LwPolylineVertex(v8));
            Arc1.Vertexes[0].Bulge = Math.Tan(par / 4.2);
            fun.PolyFill(dxf, Arc1, 0.08, contour);
            Vector2[] Line7 = { v7, v36 };
            fun.drawBLine(dxf, Line7, 0.12, contour);
            Vector2[] Line8 = { v8, v13 };
            fun.drawBLine(dxf, Line8, 0.12, contour);
            Vector2[] Line9 = { v4, v35 };
            fun.drawBLine(dxf, Line9, 0.12, contour);
            Vector2[] Line10 = { v5, v15 };
            fun.drawBLine(dxf, Line10, 0.12, contour);
            Vector2[] Line11 = { v16, v12 };
            fun.drawBLine(dxf, Line11, 0.12, contour);
            Vector2[] Line12 = { v17, v14 };
            fun.drawBLine(dxf, Line12, 0.12, contour);
            Vector2[] Line13 = { v18, v16 };
            fun.drawBLine(dxf, Line13, 0.12, contour);
            Vector2[] Line14 = { v19, v17 };
            fun.drawBLine(dxf, Line14, 0.12, contour);
            Vector2[] Line15 = { v19, v18 };
            fun.drawBLine(dxf, Line15, 0.12, contour);
            Vector2[] Line16 = { v20, v12 };
            fun.drawBLine(dxf, Line16, 0.12, contour);
            Vector2[] Line17 = { v21, v14 };
            fun.drawBLine(dxf, Line17, 0.12, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v18));
            Arc2.Vertexes.Add(new LwPolylineVertex(v20));
            Arc2.Vertexes[0].Bulge = Math.Tan(par / 6);
            fun.PolyFill(dxf, Arc2, 0.08, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v19));
            Arc3.Vertexes.Add(new LwPolylineVertex(v21));
            Arc3.Vertexes[0].Bulge = -Math.Tan(par / 6);
            fun.PolyFill(dxf, Arc3, 0.08, contour);
            Vector2[] Line18 = { v21, v20 };
            fun.drawBLine(dxf, Line18, 0.12, contour);
            Vector2[] Line19 = { v22, v21 };
            fun.drawBLine(dxf, Line19, 0.12, contour);
            Vector2[] Line20 = { v22, v23 };
            fun.drawBLine(dxf, Line20, 0.12, contour);
            Vector2[] Line21 = { v24, v23 };
            fun.drawBLine(dxf, Line21, 0.12, contour);
            Vector2[] Line22 = { v26, v20 };
            fun.drawBLine(dxf, Line22, 0.12, contour);
            Vector2[] Line23 = { v26, v27 };
            fun.drawBLine(dxf, Line23, 0.12, contour);
            Vector2[] Line24 = { v25, v28 };
            fun.drawBLine(dxf, Line24, 0.12, contour);
            Vector2[] Line25 = { v25, v29 };
            fun.drawBLine(dxf, Line25, 0.12, contour);
            Vector2[] Line26 = { v28, v29 };
            fun.drawBLine(dxf, Line26, 0.12, contour);
            Vector2[] Line27 = { v28, v30 };
            fun.drawBLine(dxf, Line27, 0.08, skdimensioning);
            Vector2[] Line28 = { v25, v31 };
            fun.drawBLine(dxf, Line28, 0.08, skdimensioning);
            Vector2[] Line29 = { v14, v35 };
            fun.drawBLine(dxf, Line29, 0.12, contour);
            Vector2[] Line30 = { v12, v36 };
            fun.drawBLine(dxf, Line30, 0.12, contour);
            //
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v1.X + l1 / 1.3 + l, v1.Y), new Vector2(v1.X - h / 10, v1.Y) },0.08, centre, Linetype.Center);
            //
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 1;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 1.8;
            double offset = 6;
            LinearDimension dim1 = new LinearDimension(new Line(v4, v7), offset * 2, 90, dimensionStyle);
            dim1.UserText = "Φ20 ";
            dxf.AddEntity(dim1);
            LinearDimension dim2 = new LinearDimension(new Line(v1, v28), offset * 5, 180, dimensionStyle);
            dim2.UserText = "180 ";
            dxf.AddEntity(dim2);
            Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v28, v30), new Line(v25, v31), offset * 6, dimensionStyle);
            angdim1.UserText = "93°";
            dxf.AddEntity(angdim1);
            LinearDimension dim3 = new LinearDimension(new Line(v30, v32), offset * 2, 270, dimensionStyle);
            dim3.UserText = "13 ";
            dxf.AddEntity(dim3);
            LinearDimension dim4 = new LinearDimension(new Line(v33, v28), offset * 4, 180, dimensionStyle);
            dim4.UserText = "30 ";
            dxf.AddEntity(dim4);

            LwPolyline poly1 = new LwPolyline();
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v34, 0, (h / 16))));
            poly1.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v34, Math.PI, (h / 16))));
            poly1.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v34, 0, (h / 16))));
            fun.PolyFill(dxf, poly1, 0.08, contour);
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint13(Dictionary<string, Object> data)   //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 20;
            double pi = Math.PI;
            double par = 93 * pi / 180;
            double l = 180;
            double l1 = 30;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h / 2 - h / 8);
            Vector2 v3 = new Vector2(v1.X, v1.Y - h / 2 + h / 8);
            Vector2 v4 = new Vector2(v2.X + (h / 8) / Math.Tan(par / 2), v2.Y + h / 8 + h / 30);
            Vector2 v5 = new Vector2(v4.X, v4.Y - h / 4);
            Vector2 v6 = new Vector2(v5.X - (h / 8) / Math.Tan(par / 2), v5.Y - h / 8);
            Vector2 v7 = new Vector2(v3.X + (h / 8) / Math.Tan(par / 2), v3.Y - h / 8 - h / 30);
            Vector2 v8 = new Vector2(v7.X, v7.Y + h / 4);
            Vector2 v9 = new Vector2(v8.X - (h / 8) / Math.Tan(par / 2), v8.Y + h / 8);
            //
            Vector2 v10 = new Vector2(v5.X - ((h / 8) / Math.Tan(par / 2)) / 2, v5.Y - (h / 8) / 2);
            Vector2 v11 = new Vector2(v8.X - ((h / 8) / Math.Tan(par / 2)) / 2, v8.Y + (h / 8) / 2);
            //
            Vector2 v12 = new Vector2(v7.X + l - (h / 8) / Math.Tan(par / 2) - l1, v3.Y - h / 8);
            Vector2 v13 = new Vector2(v8.X + l - (h / 8) / Math.Tan(par / 2) - l1, v8.Y);
            Vector2 v14 = new Vector2(v4.X + l - (h / 8) / Math.Tan(par / 2) - l1, v2.Y + h / 8);
            Vector2 v15 = new Vector2(v5.X + l - (h / 8) / Math.Tan(par / 2) - l1, v5.Y);
            //前端刀口
            Vector2 v16 = new Vector2(v12.X, v12.Y + h / 3.3);
            Vector2 v17 = new Vector2(v14.X, v2.Y + h / 8 + h / 30 - h / 3.3);
            Vector2 v18 = new Vector2(v16.X + h / 20, v16.Y);
            Vector2 v19 = new Vector2(v17.X + h / 20, v17.Y);
            //
            Vector2 v20 = new Vector2(v12.X + l1 / 3, v12.Y);
            Vector2 v21 = new Vector2(v14.X + l1 / 3, v2.Y + h / 8);
            Vector2 v22 = new Vector2(v21.X + l1 / 3, v21.Y);
            Vector2 v23 = new Vector2(v22.X + l1 / 3, v22.Y - h / 2 + h / 10);
            Vector2 v24 = new Vector2(v23.X, v23.Y - h / 5);
            //
            Vector2 v25 = new Vector2(v24.X + h / 20, v24.Y + h / 28);
            //
            Vector2 v26 = new Vector2(v20.X + h / 2 + h / 20 + (h / 20) * 2 / 5, v20.Y - h / 20 - (h / 20) * 7 / 10);
            Vector2 v27 = new Vector2(v26.X + l1 / 3 - h / 12, v26.Y);
            //
            Vector2 v28 = new Vector2(v25.X + h / 60, v27.Y - h / 26);
            //
            Vector2 v29 = new Vector2(v25.X - h / 2 + h / 16, v25.Y - (h / 20) * 6 - (h / 20) * 3 / 10);
            //
            Vector2 v30 = new Vector2(v28.X + h / 2, v28.Y);
            //
            Vector2 v31 = new Vector2(v25.X - (h / 20) / 10, v25.Y + (h / 20) * 7);
            //
            Vector2 v32 = new Vector2(v28.X + h / 2, v1.Y);
            //
            Vector2 v33 = new Vector2(v14.X - h / 16, v4.Y);
            //X
            Vector2 v34 = new Vector2(v7.X + l - (h / 8) / Math.Tan(par / 2) - l1 + h / 5.56, v7.Y + h / 4);
            //
            Vector2 v35 = new Vector2(v4.X + l - (h / 8) / Math.Tan(par / 2) - l1, v4.Y);
            Vector2 v36 = new Vector2(v7.X + l - (h / 8) / Math.Tan(par / 2) - l1, v7.Y);
            //
            //
            Vector2 v37 = new Vector2(v36.X - h / 5, v36.Y);
            Vector2 v38 = new Vector2(v35.X - h / 5, v35.Y);
            Vector2 v39 = new Vector2(v15.X - h / 5, v15.Y);
            Vector2 v40 = new Vector2(v13.X - h / 5, v13.Y);
            // 线段
            //主视图

            //Vector2[] Line1 = { v2, v3 };
            //fun.drawBLine(dxf, Line1, 0.12, contour);
            //Vector2[] Line2 = { v2, v4 };
            //fun.drawBLine(dxf, Line2, 0.12, contour);
            //Vector2[] Line3 = { v5, v4 };
            //fun.drawBLine(dxf, Line3, 0.12, contour);
            ////Vector2[] Line4 = { v5, v6 };
            ////fun.drawBLine(dxf, Line4, 0.12, contour);
            //Vector2[] Line5 = { v7, v3 };
            //fun.drawBLine(dxf, Line5, 0.12, contour);
            //Vector2[] Line6 = { v7, v8 };
            //fun.drawBLine(dxf, Line6, 0.12, contour);
            ////Vector2[] Line7 = { v9, v8 };
            ////fun.drawBLine(dxf, Line7, 0.12, contour);
            //LwPolyline Arc1 = new LwPolyline();
            //Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            //Arc1.Vertexes.Add(new LwPolylineVertex(v8));
            //Arc1.Vertexes[0].Bulge = Math.Tan(par / 4.2);
            //fun.PolyFill(dxf, Arc1, 0.08, contour);
            //
            //
            //Vector2[] Line7 = { v7, v36 };
            //fun.drawBLine(dxf, Line7, 0.12, contour);
            //Vector2[] Line8 = { v8, v13 };
            //fun.drawBLine(dxf, Line8, 0.12, contour);
            //Vector2[] Line9 = { v4, v35 };
            //fun.drawBLine(dxf, Line9, 0.12, contour);
            //Vector2[] Line10 = { v5, v15 };
            //fun.drawBLine(dxf, Line10, 0.12, contour);
            Vector2[] Line11 = { v16, v12 };
            fun.drawBLine(dxf, Line11, 0.12, contour);
            Vector2[] Line12 = { v17, v14 };
            fun.drawBLine(dxf, Line12, 0.12, contour);
            Vector2[] Line13 = { v18, v16 };
            fun.drawBLine(dxf, Line13, 0.12, contour);
            Vector2[] Line14 = { v19, v17 };
            fun.drawBLine(dxf, Line14, 0.12, contour);
            Vector2[] Line15 = { v19, v18 };
            fun.drawBLine(dxf, Line15, 0.12, contour);
            Vector2[] Line16 = { v20, v12 };
            fun.drawBLine(dxf, Line16, 0.12, contour);
            Vector2[] Line17 = { v21, v14 };
            fun.drawBLine(dxf, Line17, 0.12, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v18));
            Arc2.Vertexes.Add(new LwPolylineVertex(v20));
            Arc2.Vertexes[0].Bulge = Math.Tan(par / 6);
            fun.PolyFill(dxf, Arc2, 0.08, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v19));
            Arc3.Vertexes.Add(new LwPolylineVertex(v21));
            Arc3.Vertexes[0].Bulge = -Math.Tan(par / 6);
            fun.PolyFill(dxf, Arc3, 0.08, contour);
            Vector2[] Line18 = { v21, v20 };
            fun.drawBLine(dxf, Line18, 0.12, contour);
            Vector2[] Line19 = { v22, v21 };
            fun.drawBLine(dxf, Line19, 0.12, contour);
            Vector2[] Line20 = { v22, v23 };
            fun.drawBLine(dxf, Line20, 0.12, contour);
            Vector2[] Line21 = { v24, v23 };
            fun.drawBLine(dxf, Line21, 0.12, contour);
            Vector2[] Line22 = { v26, v20 };
            fun.drawBLine(dxf, Line22, 0.12, contour);
            Vector2[] Line23 = { v26, v27 };
            fun.drawBLine(dxf, Line23, 0.12, contour);
            Vector2[] Line24 = { v25, v28 };
            fun.drawBLine(dxf, Line24, 0.12, contour);
            Vector2[] Line25 = { v25, v29 };
            fun.drawBLine(dxf, Line25, 0.12, contour);
            Vector2[] Line26 = { v28, v29 };
            fun.drawBLine(dxf, Line26, 0.12, contour);
            //Vector2[] Line27 = { v28, v30 };
            //fun.drawBLine(dxf, Line27, 0.08, skdimensioning);
            //Vector2[] Line28 = { v25, v31 };
            //fun.drawBLine(dxf, Line28, 0.08, skdimensioning);
            Vector2[] Line29 = { v14, v35 };
            fun.drawBLine(dxf, Line29, 0.12, contour);
            Vector2[] Line30 = { v12, v36 };
            fun.drawBLine(dxf, Line30, 0.12, contour);
            LwPolyline poly1 = new LwPolyline();
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v34, 0, (h / 16))));
            poly1.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v34, Math.PI, (h / 16))));
            poly1.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v34, 0, (h / 16))));
            fun.PolyFill(dxf, poly1, 0.08, contour);
            Vector2[] Line31 = { v37, v36 };
            fun.drawBLine(dxf, Line31, 0.12, contour);
            Vector2[] Line32 = { v38, v35 };
            fun.drawBLine(dxf, Line32, 0.12, contour);
            Vector2[] Line33 = { v39, v15 };
            fun.drawBLine(dxf, Line33, 0.12, contour);
            Vector2[] Line34 = { v40, v13 };
            fun.drawBLine(dxf, Line34, 0.12, contour);
            Vector2[] Line35 = { v38, v37 };
            fun.drawBLine(dxf, Line35, 0.12, contour);
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint14(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 20;
            double pi = Math.PI;
            double par = 93 * pi / 180;
            double l = 180;
            double l1 = 30;
            string path = Convert.ToString(data["path"]);
            //主视图
            //图三
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h / 2 - h / 8);
            Vector2 v3 = new Vector2(v1.X, v1.Y - h / 2 + h / 8);
            Vector2 v4 = new Vector2(v2.X + (h / 8) / Math.Tan(par / 2), v2.Y + h / 8 + h / 30);
            Vector2 v5 = new Vector2(v4.X, v4.Y - h / 4);
            Vector2 v6 = new Vector2(v5.X - (h / 8) / Math.Tan(par / 2), v5.Y - h / 8);
            Vector2 v7 = new Vector2(v3.X + (h / 8) / Math.Tan(par / 2), v3.Y - h / 8 - h / 30);
            Vector2 v8 = new Vector2(v7.X, v7.Y + h / 4);
            Vector2 v9 = new Vector2(v8.X - (h / 8) / Math.Tan(par / 2), v8.Y + h / 8);
            //
            Vector2 v10 = new Vector2(v5.X - ((h / 8) / Math.Tan(par / 2)) / 2, v5.Y - (h / 8) / 2);
            Vector2 v11 = new Vector2(v8.X - ((h / 8) / Math.Tan(par / 2)) / 2, v8.Y + (h / 8) / 2);
            //
            Vector2 v12 = new Vector2(v7.X + l - (h / 8) / Math.Tan(par / 2) - l1, v3.Y - h / 8);
            Vector2 v13 = new Vector2(v8.X + l - (h / 8) / Math.Tan(par / 2) - l1, v8.Y);
            Vector2 v14 = new Vector2(v4.X + l - (h / 8) / Math.Tan(par / 2) - l1, v2.Y + h / 8);
            Vector2 v15 = new Vector2(v5.X + l - (h / 8) / Math.Tan(par / 2) - l1, v5.Y);
            //前端刀口
            Vector2 v16 = new Vector2(v12.X, v12.Y + h / 3.3);
            Vector2 v17 = new Vector2(v14.X, v2.Y + h / 8 + h / 30 - h / 3.3);
            Vector2 v18 = new Vector2(v16.X + h / 20, v16.Y);
            Vector2 v19 = new Vector2(v17.X + h / 20, v17.Y);
            //
            Vector2 v20 = new Vector2(v12.X + l1 / 3, v12.Y);
            Vector2 v21 = new Vector2(v14.X + l1 / 3, v2.Y + h / 8);
            Vector2 v22 = new Vector2(v21.X + l1 / 3, v21.Y);
            Vector2 v23 = new Vector2(v22.X + l1 / 3, v22.Y - h / 2 + h / 10);
            Vector2 v24 = new Vector2(v23.X, v23.Y - h / 5);
            //
            Vector2 v25 = new Vector2(v24.X + h / 20, v24.Y + h / 28);
            //
            Vector2 v26 = new Vector2(v20.X + h / 2 + h / 20 + (h / 20) * 2 / 5, v20.Y - h / 20 - (h / 20) * 7 / 10);
            Vector2 v27 = new Vector2(v26.X + l1 / 3 - h / 12, v26.Y);
            //
            Vector2 v28 = new Vector2(v25.X + h / 60, v27.Y - h / 26);
            //
            Vector2 v29 = new Vector2(v25.X - h / 2 + h / 16, v25.Y - (h / 20) * 6 - (h / 20) * 3 / 10);
            //
            Vector2 v30 = new Vector2(v28.X + h / 2, v28.Y);
            //
            Vector2 v31 = new Vector2(v25.X - (h / 20) / 10, v25.Y + (h / 20) * 7);
            //
            Vector2 v32 = new Vector2(v28.X + h / 2, v1.Y);
            //
            Vector2 v33 = new Vector2(v14.X - h / 16, v4.Y);
            //X
            Vector2 v34 = new Vector2(v7.X + l - (h / 8) / Math.Tan(par / 2) - l1 + h / 5.56, v7.Y + h / 4);
            //
            Vector2 v35 = new Vector2(v4.X + l - (h / 8) / Math.Tan(par / 2) - l1, v4.Y);
            Vector2 v36 = new Vector2(v7.X + l - (h / 8) / Math.Tan(par / 2) - l1, v7.Y);
            // 线段
            //主视图

            //Vector2[] Line1 = { v2, v3 };
            //fun.drawBLine(dxf, Line1, 0.12, contour);
            //Vector2[] Line2 = { v2, v4 };
            //fun.drawBLine(dxf, Line2, 0.12, contour);
            //Vector2[] Line3 = { v5, v4 };
            //fun.drawBLine(dxf, Line3, 0.12, contour);
            ////Vector2[] Line4 = { v5, v6 };
            ////fun.drawBLine(dxf, Line4, 0.12, contour);
            //Vector2[] Line5 = { v7, v3 };
            //fun.drawBLine(dxf, Line5, 0.12, contour);
            //Vector2[] Line6 = { v7, v8 };
            //fun.drawBLine(dxf, Line6, 0.12, contour);
            ////Vector2[] Line7 = { v9, v8 };
            ////fun.drawBLine(dxf, Line7, 0.12, contour);
            //LwPolyline Arc1 = new LwPolyline();
            //Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            //Arc1.Vertexes.Add(new LwPolylineVertex(v8));
            //Arc1.Vertexes[0].Bulge = Math.Tan(par / 4.2);
            //fun.PolyFill(dxf, Arc1, 0.08, contour);
            //Vector2[] Line7 = { v7, v36 };
            //fun.drawBLine(dxf, Line7, 0.12, contour);
            //Vector2[] Line8 = { v8, v13 };
            //fun.drawBLine(dxf, Line8, 0.12, contour);
            //Vector2[] Line9 = { v4, v35 };
            //fun.drawBLine(dxf, Line9, 0.12, contour);
            //Vector2[] Line10 = { v5, v15 };
            //fun.drawBLine(dxf, Line10, 0.12, contour);
            //Vector2[] Line11 = { v16, v12 };
            //fun.drawBLine(dxf, Line11, 0.12, contour);
            //Vector2[] Line12 = { v17, v14 };
            //fun.drawBLine(dxf, Line12, 0.12, contour);
            //Vector2[] Line13 = { v18, v16 };
            //fun.drawBLine(dxf, Line13, 0.12, contour);
            //Vector2[] Line14 = { v19, v17 };
            //fun.drawBLine(dxf, Line14, 0.12, contour);
            //Vector2[] Line15 = { v19, v18 };
            //fun.drawBLine(dxf, Line15, 0.12, contour);
            //Vector2[] Line16 = { v20, v12 };
            //fun.drawBLine(dxf, Line16, 0.12, contour);
            //Vector2[] Line17 = { v21, v14 };
            //fun.drawBLine(dxf, Line17, 0.12, contour);
            //LwPolyline Arc2 = new LwPolyline();
            //Arc2.Vertexes.Add(new LwPolylineVertex(v18));
            //Arc2.Vertexes.Add(new LwPolylineVertex(v20));
            //Arc2.Vertexes[0].Bulge = Math.Tan(par / 6);
            //fun.PolyFill(dxf, Arc2, 0.08, contour);
            //LwPolyline Arc3 = new LwPolyline();
            //Arc3.Vertexes.Add(new LwPolylineVertex(v19));
            //Arc3.Vertexes.Add(new LwPolylineVertex(v21));
            //Arc3.Vertexes[0].Bulge = -Math.Tan(par / 6);
            //fun.PolyFill(dxf, Arc3, 0.08, contour);
            //Vector2[] Line18 = { v21, v20 };
            //fun.drawBLine(dxf, Line18, 0.12, contour);
            //Vector2[] Line19 = { v22, v21 };
            //fun.drawBLine(dxf, Line19, 0.12, contour);
            //Vector2[] Line20 = { v22, v23 };
            //fun.drawBLine(dxf, Line20, 0.12, contour);
            //Vector2[] Line21 = { v24, v23 };
            //fun.drawBLine(dxf, Line21, 0.12, contour);
            //Vector2[] Line22 = { v26, v20 };
            //fun.drawBLine(dxf, Line22, 0.12, contour);
            //Vector2[] Line23 = { v26, v27 };
            //fun.drawBLine(dxf, Line23, 0.12, contour);
            //Vector2[] Line24 = { v25, v28 };
            //fun.drawBLine(dxf, Line24, 0.12, contour);
            //Vector2[] Line25 = { v25, v29 };
            //fun.drawBLine(dxf, Line25, 0.12, contour);
            //Vector2[] Line26 = { v28, v29 };
            //fun.drawBLine(dxf, Line26, 0.12, contour);
            //Vector2[] Line27 = { v28, v30 };
            //fun.drawBLine(dxf, Line27, 0.08, skdimensioning);
            //Vector2[] Line28 = { v25, v31 };
            //fun.drawBLine(dxf, Line28, 0.08, skdimensioning);
            //Vector2[] Line29 = { v14, v35 };
            //fun.drawBLine(dxf, Line29, 0.12, contour);
            //Vector2[] Line30 = { v12, v36 };
            //fun.drawBLine(dxf, Line30, 0.12, contour);
            ////
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v1.X + l1 / 1.3 + l, v1.Y), new Vector2(v1.X - h / 10, v1.Y) }, centre, Linetype.Center);
            //
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 1;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 1.8;
            double offset = 6;
            //LinearDimension dim1 = new LinearDimension(new Line(v4, v7), offset * 2, 90, dimensionStyle);
            //dim1.UserText = "Φ20 ";
            //dxf.AddEntity(dim1);
            //LinearDimension dim2 = new LinearDimension(new Line(v1, v28), offset * 5, 180, dimensionStyle);
            //dim2.UserText = "180 ";
            //dxf.AddEntity(dim2);
            Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v28, v30), new Line(v25, v31), offset * 6, dimensionStyle);
            angdim1.UserText = "93°";
            dxf.AddEntity(angdim1);
            LinearDimension dim3 = new LinearDimension(new Line(v30, v32), offset * 2, 270, dimensionStyle);
            dim3.UserText = "13 ";
            dxf.AddEntity(dim3);
            LinearDimension dim4 = new LinearDimension(new Line(v33, v28), offset * 4, 180, dimensionStyle);
            dim4.UserText = "30 ";
            dxf.AddEntity(dim4);

            //LwPolyline poly1 = new LwPolyline();
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v34, 0, (h / 16))));
            //poly1.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v34, Math.PI, (h / 16))));
            //poly1.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v34, 0, (h / 16))));
            //fun.PolyFill(dxf, poly1, 0.08, contour);
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint15(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 20;
            double pi = Math.PI;
            double par = 93 * pi / 180;
            double l = 180;
            double l1 = 30;
            string path = Convert.ToString(data["path"]);
            //主视图
            //图三
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h / 2 - h / 8);
            Vector2 v3 = new Vector2(v1.X, v1.Y - h / 2 + h / 8);
            Vector2 v4 = new Vector2(v2.X + (h / 8) / Math.Tan(par / 2), v2.Y + h / 8 + h / 30);
            Vector2 v5 = new Vector2(v4.X, v4.Y - h / 4);
            Vector2 v6 = new Vector2(v5.X - (h / 8) / Math.Tan(par / 2), v5.Y - h / 8);
            Vector2 v7 = new Vector2(v3.X + (h / 8) / Math.Tan(par / 2), v3.Y - h / 8 - h / 30);
            Vector2 v8 = new Vector2(v7.X, v7.Y + h / 4);
            Vector2 v9 = new Vector2(v8.X - (h / 8) / Math.Tan(par / 2), v8.Y + h / 8);
            //
            Vector2 v10 = new Vector2(v5.X - ((h / 8) / Math.Tan(par / 2)) / 2, v5.Y - (h / 8) / 2);
            Vector2 v11 = new Vector2(v8.X - ((h / 8) / Math.Tan(par / 2)) / 2, v8.Y + (h / 8) / 2);
            //
            Vector2 v12 = new Vector2(v7.X + l - (h / 8) / Math.Tan(par / 2) - l1, v3.Y - h / 8);
            Vector2 v13 = new Vector2(v8.X + l - (h / 8) / Math.Tan(par / 2) - l1, v8.Y);
            Vector2 v14 = new Vector2(v4.X + l - (h / 8) / Math.Tan(par / 2) - l1, v2.Y + h / 8);
            Vector2 v15 = new Vector2(v5.X + l - (h / 8) / Math.Tan(par / 2) - l1, v5.Y);
            //前端刀口
            Vector2 v16 = new Vector2(v12.X, v12.Y + h / 3.3);
            Vector2 v17 = new Vector2(v14.X, v2.Y + h / 8 + h / 30 - h / 3.3);
            Vector2 v18 = new Vector2(v16.X + h / 20, v16.Y);
            Vector2 v19 = new Vector2(v17.X + h / 20, v17.Y);
            //
            Vector2 v20 = new Vector2(v12.X + l1 / 3, v12.Y);
            Vector2 v21 = new Vector2(v14.X + l1 / 3, v2.Y + h / 8);
            Vector2 v22 = new Vector2(v21.X + l1 / 3, v21.Y);
            Vector2 v23 = new Vector2(v22.X + l1 / 3, v22.Y - h / 2 + h / 10);
            Vector2 v24 = new Vector2(v23.X, v23.Y - h / 5);
            //
            Vector2 v25 = new Vector2(v24.X + h / 20, v24.Y + h / 28);
            //
            Vector2 v26 = new Vector2(v20.X + h / 2 + h / 20 + (h / 20) * 2 / 5, v20.Y - h / 20 - (h / 20) * 7 / 10);
            Vector2 v27 = new Vector2(v26.X + l1 / 3 - h / 12, v26.Y);
            //
            Vector2 v28 = new Vector2(v25.X + h / 60, v27.Y - h / 26);
            //
            Vector2 v29 = new Vector2(v25.X - h / 2 + h / 16, v25.Y - (h / 20) * 6 - (h / 20) * 3 / 10);
            //
            Vector2 v30 = new Vector2(v28.X + h / 2, v28.Y);
            //
            Vector2 v31 = new Vector2(v25.X - (h / 20) / 10, v25.Y + (h / 20) * 7);
            //
            Vector2 v32 = new Vector2(v28.X + h / 2, v1.Y);
            //
            Vector2 v33 = new Vector2(v14.X - h / 16, v4.Y);
            //X
            Vector2 v34 = new Vector2(v7.X + l - (h / 8) / Math.Tan(par / 2) - l1 + h / 5.56, v7.Y + h / 4);
            //
            Vector2 v35 = new Vector2(v4.X + l - (h / 8) / Math.Tan(par / 2) - l1, v4.Y);
            Vector2 v36 = new Vector2(v7.X + l - (h / 8) / Math.Tan(par / 2) - l1, v7.Y);
            // 线段
            //主视图

            //Vector2[] Line1 = { v2, v3 };
            //fun.drawBLine(dxf, Line1, 0.12, contour);
            //Vector2[] Line2 = { v2, v4 };
            //fun.drawBLine(dxf, Line2, 0.12, contour);
            //Vector2[] Line3 = { v5, v4 };
            //fun.drawBLine(dxf, Line3, 0.12, contour);
            ////Vector2[] Line4 = { v5, v6 };
            ////fun.drawBLine(dxf, Line4, 0.12, contour);
            //Vector2[] Line5 = { v7, v3 };
            //fun.drawBLine(dxf, Line5, 0.12, contour);
            //Vector2[] Line6 = { v7, v8 };
            //fun.drawBLine(dxf, Line6, 0.12, contour);
            ////Vector2[] Line7 = { v9, v8 };
            ////fun.drawBLine(dxf, Line7, 0.12, contour);
            //LwPolyline Arc1 = new LwPolyline();
            //Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            //Arc1.Vertexes.Add(new LwPolylineVertex(v8));
            //Arc1.Vertexes[0].Bulge = Math.Tan(par / 4.2);
            //fun.PolyFill(dxf, Arc1, 0.08, contour);
            //Vector2[] Line7 = { v7, v36 };
            //fun.drawBLine(dxf, Line7, 0.12, contour);
            //Vector2[] Line8 = { v8, v13 };
            //fun.drawBLine(dxf, Line8, 0.12, contour);
            //Vector2[] Line9 = { v4, v35 };
            //fun.drawBLine(dxf, Line9, 0.12, contour);
            //Vector2[] Line10 = { v5, v15 };
            //fun.drawBLine(dxf, Line10, 0.12, contour);
            //Vector2[] Line11 = { v16, v12 };
            //fun.drawBLine(dxf, Line11, 0.12, contour);
            //Vector2[] Line12 = { v17, v14 };
            //fun.drawBLine(dxf, Line12, 0.12, contour);
            //Vector2[] Line13 = { v18, v16 };
            //fun.drawBLine(dxf, Line13, 0.12, contour);
            //Vector2[] Line14 = { v19, v17 };
            //fun.drawBLine(dxf, Line14, 0.12, contour);
            //Vector2[] Line15 = { v19, v18 };
            //fun.drawBLine(dxf, Line15, 0.12, contour);
            //Vector2[] Line16 = { v20, v12 };
            //fun.drawBLine(dxf, Line16, 0.12, contour);
            //Vector2[] Line17 = { v21, v14 };
            //fun.drawBLine(dxf, Line17, 0.12, contour);
            //LwPolyline Arc2 = new LwPolyline();
            //Arc2.Vertexes.Add(new LwPolylineVertex(v18));
            //Arc2.Vertexes.Add(new LwPolylineVertex(v20));
            //Arc2.Vertexes[0].Bulge = Math.Tan(par / 6);
            //fun.PolyFill(dxf, Arc2, 0.08, contour);
            //LwPolyline Arc3 = new LwPolyline();
            //Arc3.Vertexes.Add(new LwPolylineVertex(v19));
            //Arc3.Vertexes.Add(new LwPolylineVertex(v21));
            //Arc3.Vertexes[0].Bulge = -Math.Tan(par / 6);
            //fun.PolyFill(dxf, Arc3, 0.08, contour);
            //Vector2[] Line18 = { v21, v20 };
            //fun.drawBLine(dxf, Line18, 0.12, contour);
            //Vector2[] Line19 = { v22, v21 };
            //fun.drawBLine(dxf, Line19, 0.12, contour);
            //Vector2[] Line20 = { v22, v23 };
            //fun.drawBLine(dxf, Line20, 0.12, contour);
            //Vector2[] Line21 = { v24, v23 };
            //fun.drawBLine(dxf, Line21, 0.12, contour);
            //Vector2[] Line22 = { v26, v20 };
            //fun.drawBLine(dxf, Line22, 0.12, contour);
            //Vector2[] Line23 = { v26, v27 };
            //fun.drawBLine(dxf, Line23, 0.12, contour);
            //Vector2[] Line24 = { v25, v28 };
            //fun.drawBLine(dxf, Line24, 0.12, contour);
            //Vector2[] Line25 = { v25, v29 };
            //fun.drawBLine(dxf, Line25, 0.12, contour);
            //Vector2[] Line26 = { v28, v29 };
            //fun.drawBLine(dxf, Line26, 0.12, contour);
            //Vector2[] Line27 = { v28, v30 };
            //fun.drawBLine(dxf, Line27, 0.08, skdimensioning);
            //Vector2[] Line28 = { v25, v31 };
            //fun.drawBLine(dxf, Line28, 0.08, skdimensioning);
            //Vector2[] Line29 = { v14, v35 };
            //fun.drawBLine(dxf, Line29, 0.12, contour);
            //Vector2[] Line30 = { v12, v36 };
            //fun.drawBLine(dxf, Line30, 0.12, contour);
            ////
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v1.X + l1 / 1.3 + l, v1.Y), new Vector2(v1.X - h / 10, v1.Y) },0.08, centre, Linetype.Center);
            //
            //DimensionStyle dimensionStyle = fun.CreateDimStyle();
            //dimensionStyle.ArrowSize = 1;
            //dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.TextHeight = 1.8;
            //double offset = 6;
            ////LinearDimension dim1 = new LinearDimension(new Line(v4, v7), offset * 2, 90, dimensionStyle);
            ////dim1.UserText = "Φ20 ";
            ////dxf.AddEntity(dim1);
            ////LinearDimension dim2 = new LinearDimension(new Line(v1, v28), offset * 5, 180, dimensionStyle);
            ////dim2.UserText = "180 ";
            ////dxf.AddEntity(dim2);
            //Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v28, v30), new Line(v25, v31), offset * 6, dimensionStyle);
            //angdim1.UserText = "93°";
            //dxf.AddEntity(angdim1);
            //LinearDimension dim3 = new LinearDimension(new Line(v30, v32), offset * 2, 270, dimensionStyle);
            //dim3.UserText = "13 ";
            //dxf.AddEntity(dim3);
            //LinearDimension dim4 = new LinearDimension(new Line(v33, v28), offset * 4, 180, dimensionStyle);
            //dim4.UserText = "30 ";
            //dxf.AddEntity(dim4);

            //LwPolyline poly1 = new LwPolyline();
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v34, 0, (h / 16))));
            //poly1.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v34, Math.PI, (h / 16))));
            //poly1.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v34, 0, (h / 16))));
            //fun.PolyFill(dxf, poly1, 0.08, contour);
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint16(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 20;
            double pi = Math.PI;
            double par = 93 * pi / 180;
            double l = 180;
            double l1 = 30;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h / 2 - h / 8);
            Vector2 v3 = new Vector2(v1.X, v1.Y - h / 2 + h / 8);
            Vector2 v4 = new Vector2(v2.X + (h / 8) / Math.Tan(par / 2), v2.Y + h / 8 + h / 30);
            Vector2 v5 = new Vector2(v4.X, v4.Y - h / 4);
            Vector2 v6 = new Vector2(v5.X - (h / 8) / Math.Tan(par / 2), v5.Y - h / 8);
            Vector2 v7 = new Vector2(v3.X + (h / 8) / Math.Tan(par / 2), v3.Y - h / 8 - h / 30);
            Vector2 v8 = new Vector2(v7.X, v7.Y + h / 4);
            Vector2 v9 = new Vector2(v8.X - (h / 8) / Math.Tan(par / 2), v8.Y + h / 8);
            //
            Vector2 v10 = new Vector2(v5.X - ((h / 8) / Math.Tan(par / 2)) / 2, v5.Y - (h / 8) / 2);
            Vector2 v11 = new Vector2(v8.X - ((h / 8) / Math.Tan(par / 2)) / 2, v8.Y + (h / 8) / 2);
            //
            Vector2 v12 = new Vector2(v7.X + l - (h / 8) / Math.Tan(par / 2) - l1, v3.Y - h / 8);
            Vector2 v13 = new Vector2(v8.X + l - (h / 8) / Math.Tan(par / 2) - l1, v8.Y);
            Vector2 v14 = new Vector2(v4.X + l - (h / 8) / Math.Tan(par / 2) - l1, v2.Y + h / 8);
            Vector2 v15 = new Vector2(v5.X + l - (h / 8) / Math.Tan(par / 2) - l1, v5.Y);
            //前端刀口
            Vector2 v16 = new Vector2(v12.X, v12.Y + h / 3.3);
            Vector2 v17 = new Vector2(v14.X, v2.Y + h / 8 + h / 30 - h / 3.3);
            Vector2 v18 = new Vector2(v16.X + h / 20, v16.Y);
            Vector2 v19 = new Vector2(v17.X + h / 20, v17.Y);
            //
            Vector2 v20 = new Vector2(v12.X + l1 / 3, v12.Y);
            Vector2 v21 = new Vector2(v14.X + l1 / 3, v2.Y + h / 8);
            Vector2 v22 = new Vector2(v21.X + l1 / 3, v21.Y);
            Vector2 v23 = new Vector2(v22.X + l1 / 3, v22.Y - h / 2 + h / 10);
            Vector2 v24 = new Vector2(v23.X, v23.Y - h / 5);
            //
            Vector2 v25 = new Vector2(v24.X + h / 20, v24.Y + h / 28);
            //
            Vector2 v26 = new Vector2(v20.X + h / 2 + h / 20 + (h / 20) * 2 / 5, v20.Y - h / 20 - (h / 20) * 7 / 10);
            Vector2 v27 = new Vector2(v26.X + l1 / 3 - h / 16, v26.Y);
            //
            Vector2 v28 = new Vector2(v25.X + h / 60, v27.Y - h / 26);
            //
            Vector2 v29 = new Vector2(v25.X - h / 2 + h / 16, v25.Y - (h / 20) * 6 - (h / 20) * 3 / 10);
            //
            Vector2 v30 = new Vector2(v28.X + h / 2, v28.Y);
            //
            Vector2 v31 = new Vector2(v25.X - (h / 20) / 10, v25.Y + (h / 20) * 7);
            //
            Vector2 v32 = new Vector2(v28.X + h / 2, v1.Y);
            //
            Vector2 v33 = new Vector2(v14.X - h / 16, v4.Y);
            //X
            Vector2 v34 = new Vector2(v7.X + l - (h / 8) / Math.Tan(par / 2) - l1 + h / 5.56, v7.Y + h / 4);
            //
            Vector2 v35 = new Vector2(v4.X + l - (h / 8) / Math.Tan(par / 2) - l1, v4.Y);
            Vector2 v36 = new Vector2(v7.X + l - (h / 8) / Math.Tan(par / 2) - l1, v7.Y);
            //
            //
            Vector2 v37 = new Vector2(v36.X - h / 5, v36.Y);
            Vector2 v38 = new Vector2(v35.X - h / 5, v35.Y);
            Vector2 v39 = new Vector2(v15.X - h / 5, v15.Y);
            Vector2 v40 = new Vector2(v13.X - h / 5, v13.Y);
            // 线段
            //主视图

            //Vector2[] Line1 = { v2, v3 };
            //fun.drawBLine(dxf, Line1, 0.12, contour);
            //Vector2[] Line2 = { v2, v4 };
            //fun.drawBLine(dxf, Line2, 0.12, contour);
            //Vector2[] Line3 = { v5, v4 };
            //fun.drawBLine(dxf, Line3, 0.12, contour);
            ////Vector2[] Line4 = { v5, v6 };
            ////fun.drawBLine(dxf, Line4, 0.12, contour);
            //Vector2[] Line5 = { v7, v3 };
            //fun.drawBLine(dxf, Line5, 0.12, contour);
            //Vector2[] Line6 = { v7, v8 };
            //fun.drawBLine(dxf, Line6, 0.12, contour);
            ////Vector2[] Line7 = { v9, v8 };
            ////fun.drawBLine(dxf, Line7, 0.12, contour);
            //LwPolyline Arc1 = new LwPolyline();
            //Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            //Arc1.Vertexes.Add(new LwPolylineVertex(v8));
            //Arc1.Vertexes[0].Bulge = Math.Tan(par / 4.2);
            //fun.PolyFill(dxf, Arc1, 0.08, contour);
            //
            //
            //Vector2[] Line7 = { v7, v36 };
            //fun.drawBLine(dxf, Line7, 0.12, contour);
            //Vector2[] Line8 = { v8, v13 };
            //fun.drawBLine(dxf, Line8, 0.12, contour);
            //Vector2[] Line9 = { v4, v35 };
            //fun.drawBLine(dxf, Line9, 0.12, contour);
            //Vector2[] Line10 = { v5, v15 };
            //fun.drawBLine(dxf, Line10, 0.12, contour);
            //
            //Vector2[] Line11 = { v16, v12 };
            //fun.drawBLine(dxf, Line11, 0.12, contour);
            //Vector2[] Line12 = { v17, v14 };
            //fun.drawBLine(dxf, Line12, 0.12, contour);
            //Vector2[] Line13 = { v18, v16 };
            //fun.drawBLine(dxf, Line13, 0.12, contour);
            //
            //Vector2[] Line14 = { v19, v17 };
            //fun.drawBLine(dxf, Line14, 0.12, contour);
            //Vector2[] Line15 = { v19, v18 };
            //fun.drawBLine(dxf, Line15, 0.12, contour);
            Vector2[] Line16 = { v20, v12 };
            fun.drawBLine(dxf, Line16, 0.12, contour);
            Vector2[] Line17 = { v21, v14 };
            fun.drawBLine(dxf, Line17, 0.12, contour);
            //LwPolyline Arc2 = new LwPolyline();
            //Arc2.Vertexes.Add(new LwPolylineVertex(v18));
            //Arc2.Vertexes.Add(new LwPolylineVertex(v20));
            //Arc2.Vertexes[0].Bulge = Math.Tan(par / 6);
            //fun.PolyFill(dxf, Arc2, 0.08, contour);
            //LwPolyline Arc3 = new LwPolyline();
            //Arc3.Vertexes.Add(new LwPolylineVertex(v19));
            //Arc3.Vertexes.Add(new LwPolylineVertex(v21));
            //Arc3.Vertexes[0].Bulge = -Math.Tan(par / 6);
            //fun.PolyFill(dxf, Arc3, 0.08, contour);
            //Vector2[] Line18 = { v21, v20 };
            //fun.drawBLine(dxf, Line18, 0.12, contour);
            Vector2[] Line19 = { v22, v21 };
            fun.drawBLine(dxf, Line19, 0.12, contour);
            Vector2[] Line20 = { v22, v23 };
            fun.drawBLine(dxf, Line20, 0.12, contour);
            Vector2[] Line21 = { v24, v23 };
            fun.drawBLine(dxf, Line21, 0.12, contour);
            Vector2[] Line22 = { v26, v20 };
            fun.drawBLine(dxf, Line22, 0.12, contour);
            Vector2[] Line23 = { v26, v27 };
            fun.drawBLine(dxf, Line23, 0.12, contour);
            //Vector2[] Line24 = { v25, v28 };
            //fun.drawBLine(dxf, Line24, 0.12, contour);
            //Vector2[] Line25 = { v25, v29 };
            //fun.drawBLine(dxf, Line25, 0.12, contour);
            //Vector2[] Line26 = { v28, v29 };
            //fun.drawBLine(dxf, Line26, 0.12, contour);
            //Vector2[] Line27 = { v28, v30 };
            //fun.drawBLine(dxf, Line27, 0.08, skdimensioning);
            //Vector2[] Line28 = { v25, v31 };
            //fun.drawBLine(dxf, Line28, 0.08, skdimensioning);
            Vector2[] Line29 = { v14, v35 };
            fun.drawBLine(dxf, Line29, 0.12, contour);
            Vector2[] Line30 = { v12, v36 };
            fun.drawBLine(dxf, Line30, 0.12, contour);
            //LwPolyline poly1 = new LwPolyline();
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v34, 0, (h / 16))));
            //poly1.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v34, Math.PI, (h / 16))));
            //poly1.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v34, 0, (h / 16))));
            //fun.PolyFill(dxf, poly1, 0.08, contour);
            Vector2[] Line31 = { v37, v36 };
            fun.drawBLine(dxf, Line31, 0.12, contour);
            Vector2[] Line32 = { v38, v35 };
            fun.drawBLine(dxf, Line32, 0.12, contour);
            //Vector2[] Line33 = { v39, v15 };
            //fun.drawBLine(dxf, Line33, 0.12, contour);
            //Vector2[] Line34 = { v40, v13 };
            //fun.drawBLine(dxf, Line34, 0.12, contour);
            Vector2[] Line35 = { v38, v37 };
            fun.drawBLine(dxf, Line35, 0.12, contour);
            Vector2[] Line36 = { v24, v27 };
            fun.drawBLine(dxf, Line36, 0.12, contour);
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint17(Dictionary<string, Object> data)   //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 20;
            double pi = Math.PI;
            double par = 93 * pi / 180;
            double l = 180;
            double l1 = 30;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h / 2 - h / 8);
            Vector2 v3 = new Vector2(v1.X, v1.Y - h / 2 + h / 8);
            Vector2 v4 = new Vector2(v2.X + (h / 8) / Math.Tan(par / 2), v2.Y + h / 8 + h / 30);
            Vector2 v5 = new Vector2(v4.X, v4.Y - h / 4);
            Vector2 v6 = new Vector2(v5.X - (h / 8) / Math.Tan(par / 2), v5.Y - h / 8);
            Vector2 v7 = new Vector2(v3.X + (h / 8) / Math.Tan(par / 2), v3.Y - h / 8 - h / 30);
            Vector2 v8 = new Vector2(v7.X, v7.Y + h / 4);
            Vector2 v9 = new Vector2(v8.X - (h / 8) / Math.Tan(par / 2), v8.Y + h / 8);
            //
            Vector2 v10 = new Vector2(v5.X - ((h / 8) / Math.Tan(par / 2)) / 2, v5.Y - (h / 8) / 2);
            Vector2 v11 = new Vector2(v8.X - ((h / 8) / Math.Tan(par / 2)) / 2, v8.Y + (h / 8) / 2);
            //
            Vector2 v12 = new Vector2(v7.X + l - (h / 8) / Math.Tan(par / 2) - l1, v3.Y - h / 8);
            Vector2 v13 = new Vector2(v8.X + l - (h / 8) / Math.Tan(par / 2) - l1, v8.Y);
            Vector2 v14 = new Vector2(v4.X + l - (h / 8) / Math.Tan(par / 2) - l1, v2.Y + h / 8);
            Vector2 v15 = new Vector2(v5.X + l - (h / 8) / Math.Tan(par / 2) - l1, v5.Y);
            //前端刀口
            Vector2 v16 = new Vector2(v12.X, v12.Y + h / 3.3);
            Vector2 v17 = new Vector2(v14.X, v2.Y + h / 8 + h / 30 - h / 3.3);
            Vector2 v18 = new Vector2(v16.X + h / 20, v16.Y);
            Vector2 v19 = new Vector2(v17.X + h / 20, v17.Y);
            //
            Vector2 v20 = new Vector2(v12.X + l1 / 3, v12.Y);
            Vector2 v21 = new Vector2(v14.X + l1 / 3, v2.Y + h / 8);
            Vector2 v22 = new Vector2(v21.X + l1 / 3, v21.Y);
            Vector2 v23 = new Vector2(v22.X + l1 / 3, v22.Y - h / 2 + h / 10);
            Vector2 v24 = new Vector2(v23.X, v23.Y - h / 5);
            //
            Vector2 v25 = new Vector2(v24.X + h / 20, v24.Y + h / 28);
            //
            Vector2 v26 = new Vector2(v20.X + h / 2 + h / 20 + (h / 20) * 2 / 5, v20.Y - h / 20 - (h / 20) * 7 / 10);
            Vector2 v27 = new Vector2(v26.X + l1 / 3 - h / 16, v26.Y);
            //
            Vector2 v28 = new Vector2(v25.X + h / 60, v27.Y - h / 26);
            //
            Vector2 v29 = new Vector2(v25.X - h / 2 + h / 16, v25.Y - (h / 20) * 6 - (h / 20) * 3 / 10);
            //
            Vector2 v30 = new Vector2(v28.X + h / 2, v28.Y);
            //
            Vector2 v31 = new Vector2(v25.X - (h / 20) / 10, v25.Y + (h / 20) * 7);
            //
            Vector2 v32 = new Vector2(v28.X + h / 2, v1.Y);
            //
            Vector2 v33 = new Vector2(v14.X - h / 16, v4.Y);
            //X
            Vector2 v34 = new Vector2(v7.X + l - (h / 8) / Math.Tan(par / 2) - l1 + h / 5.56, v7.Y + h / 4);
            //
            Vector2 v35 = new Vector2(v4.X + l - (h / 8) / Math.Tan(par / 2) - l1, v4.Y);
            Vector2 v36 = new Vector2(v7.X + l - (h / 8) / Math.Tan(par / 2) - l1, v7.Y);
            //
            //
            Vector2 v37 = new Vector2(v36.X - h / 5, v36.Y);
            Vector2 v38 = new Vector2(v35.X - h / 5, v35.Y);
            Vector2 v39 = new Vector2(v15.X - h / 5, v15.Y);
            Vector2 v40 = new Vector2(v13.X - h / 5, v13.Y);
            // 线段
            //主视图

            //Vector2[] Line1 = { v2, v3 };
            //fun.drawBLine(dxf, Line1, 0.12, contour);
            //Vector2[] Line2 = { v2, v4 };
            //fun.drawBLine(dxf, Line2, 0.12, contour);
            //Vector2[] Line3 = { v5, v4 };
            //fun.drawBLine(dxf, Line3, 0.12, contour);
            ////Vector2[] Line4 = { v5, v6 };
            ////fun.drawBLine(dxf, Line4, 0.12, contour);
            //Vector2[] Line5 = { v7, v3 };
            //fun.drawBLine(dxf, Line5, 0.12, contour);
            //Vector2[] Line6 = { v7, v8 };
            //fun.drawBLine(dxf, Line6, 0.12, contour);
            ////Vector2[] Line7 = { v9, v8 };
            ////fun.drawBLine(dxf, Line7, 0.12, contour);
            //LwPolyline Arc1 = new LwPolyline();
            //Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            //Arc1.Vertexes.Add(new LwPolylineVertex(v8));
            //Arc1.Vertexes[0].Bulge = Math.Tan(par / 4.2);
            //fun.PolyFill(dxf, Arc1, 0.08, contour);
            //
            //
            //Vector2[] Line7 = { v7, v36 };
            //fun.drawBLine(dxf, Line7, 0.12, contour);
            //Vector2[] Line8 = { v8, v13 };
            //fun.drawBLine(dxf, Line8, 0.12, contour);
            //Vector2[] Line9 = { v4, v35 };
            //fun.drawBLine(dxf, Line9, 0.12, contour);
            //Vector2[] Line10 = { v5, v15 };
            //fun.drawBLine(dxf, Line10, 0.12, contour);
            //
            //Vector2[] Line11 = { v16, v12 };
            //fun.drawBLine(dxf, Line11, 0.12, contour);
            //Vector2[] Line12 = { v17, v14 };
            //fun.drawBLine(dxf, Line12, 0.12, contour);
            //Vector2[] Line13 = { v18, v16 };
            //fun.drawBLine(dxf, Line13, 0.12, contour);
            //
            //Vector2[] Line14 = { v19, v17 };
            //fun.drawBLine(dxf, Line14, 0.12, contour);
            //Vector2[] Line15 = { v19, v18 };
            //fun.drawBLine(dxf, Line15, 0.12, contour);
            //Vector2[] Line16 = { v20, v12 };
            //fun.drawBLine(dxf, Line16, 0.12, contour);
            //Vector2[] Line17 = { v21, v14 };
            //fun.drawBLine(dxf, Line17, 0.12, contour);
            //LwPolyline Arc2 = new LwPolyline();
            //Arc2.Vertexes.Add(new LwPolylineVertex(v18));
            //Arc2.Vertexes.Add(new LwPolylineVertex(v20));
            //Arc2.Vertexes[0].Bulge = Math.Tan(par / 6);
            //fun.PolyFill(dxf, Arc2, 0.08, contour);
            //LwPolyline Arc3 = new LwPolyline();
            //Arc3.Vertexes.Add(new LwPolylineVertex(v19));
            //Arc3.Vertexes.Add(new LwPolylineVertex(v21));
            //Arc3.Vertexes[0].Bulge = -Math.Tan(par / 6);
            //fun.PolyFill(dxf, Arc3, 0.08, contour);
            //Vector2[] Line18 = { v21, v20 };
            //fun.drawBLine(dxf, Line18, 0.12, contour);
            //Vector2[] Line19 = { v22, v21 };
            //fun.drawBLine(dxf, Line19, 0.12, contour);
            //Vector2[] Line20 = { v22, v23 };
            //fun.drawBLine(dxf, Line20, 0.12, contour);
            //Vector2[] Line21 = { v24, v23 };
            //fun.drawBLine(dxf, Line21, 0.12, contour);
            //Vector2[] Line22 = { v26, v20 };
            //fun.drawBLine(dxf, Line22, 0.12, contour);
            //Vector2[] Line23 = { v26, v27 };
            //fun.drawBLine(dxf, Line23, 0.12, contour);
            Vector2[] Line24 = { v25, v28 };
            fun.drawBLine(dxf, Line24, 0.12, contour);
            Vector2[] Line25 = { v25, v29 };
            fun.drawBLine(dxf, Line25, 0.12, contour);
            Vector2[] Line26 = { v28, v29 };
            fun.drawBLine(dxf, Line26, 0.12, contour);
            //Vector2[] Line27 = { v28, v30 };
            //fun.drawBLine(dxf, Line27, 0.08, skdimensioning);
            //Vector2[] Line28 = { v25, v31 };
            //fun.drawBLine(dxf, Line28, 0.08, skdimensioning);
            //Vector2[] Line29 = { v14, v35 };
            //fun.drawBLine(dxf, Line29, 0.12, contour);
            //Vector2[] Line30 = { v12, v36 };
            //fun.drawBLine(dxf, Line30, 0.12, contour);
            //LwPolyline poly1 = new LwPolyline();
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v34, 0, (h / 16))));
            //poly1.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v34, Math.PI, (h / 16))));
            //poly1.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v34, 0, (h / 16))));
            //fun.PolyFill(dxf, poly1, 0.08, contour);
            //Vector2[] Line31 = { v37, v36 };
            //fun.drawBLine(dxf, Line31, 0.12, contour);
            //Vector2[] Line32 = { v38, v35 };
            //fun.drawBLine(dxf, Line32, 0.12, contour);
            ////Vector2[] Line33 = { v39, v15 };
            ////fun.drawBLine(dxf, Line33, 0.12, contour);
            ////Vector2[] Line34 = { v40, v13 };
            ////fun.drawBLine(dxf, Line34, 0.12, contour);
            //Vector2[] Line35 = { v38, v37 };
            //fun.drawBLine(dxf, Line35, 0.12, contour);
            //Vector2[] Line36 = { v24, v27 };
            //fun.drawBLine(dxf, Line36, 0.12, contour);
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint18(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 20;
            double pi = Math.PI;
            double par = 93 * pi / 180;
            double l = 180;
            double l1 = 30;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h / 2 - h / 8);
            Vector2 v3 = new Vector2(v1.X, v1.Y - h / 2 + h / 8);
            Vector2 v4 = new Vector2(v2.X + (h / 8) / Math.Tan(par / 2), v2.Y + h / 8 + h / 30);
            Vector2 v5 = new Vector2(v4.X, v4.Y - h / 4);
            Vector2 v6 = new Vector2(v5.X - (h / 8) / Math.Tan(par / 2), v5.Y - h / 8);
            Vector2 v7 = new Vector2(v3.X + (h / 8) / Math.Tan(par / 2), v3.Y - h / 8 - h / 30);
            Vector2 v8 = new Vector2(v7.X, v7.Y + h / 4);
            Vector2 v9 = new Vector2(v8.X - (h / 8) / Math.Tan(par / 2), v8.Y + h / 8);
            //
            Vector2 v10 = new Vector2(v5.X - ((h / 8) / Math.Tan(par / 2)) / 2, v5.Y - (h / 8) / 2);
            Vector2 v11 = new Vector2(v8.X - ((h / 8) / Math.Tan(par / 2)) / 2, v8.Y + (h / 8) / 2);
            //
            Vector2 v12 = new Vector2(v7.X + l - (h / 8) / Math.Tan(par / 2) - l1, v3.Y - h / 8);
            Vector2 v13 = new Vector2(v8.X + l - (h / 8) / Math.Tan(par / 2) - l1, v8.Y);
            Vector2 v14 = new Vector2(v4.X + l - (h / 8) / Math.Tan(par / 2) - l1, v2.Y + h / 8);
            Vector2 v15 = new Vector2(v5.X + l - (h / 8) / Math.Tan(par / 2) - l1, v5.Y);
            //前端刀口
            Vector2 v16 = new Vector2(v12.X, v12.Y + h / 3.3);
            Vector2 v17 = new Vector2(v14.X, v2.Y + h / 8 + h / 30 - h / 3.3);
            Vector2 v18 = new Vector2(v16.X + h / 20, v16.Y);
            Vector2 v19 = new Vector2(v17.X + h / 20, v17.Y);
            //
            Vector2 v20 = new Vector2(v12.X + l1 / 3, v12.Y);
            Vector2 v21 = new Vector2(v14.X + l1 / 3, v2.Y + h / 8);
            Vector2 v22 = new Vector2(v21.X + l1 / 3, v21.Y);
            Vector2 v23 = new Vector2(v22.X + l1 / 3, v22.Y - h / 2 + h / 10);
            Vector2 v24 = new Vector2(v23.X, v23.Y - h / 5);
            //
            Vector2 v25 = new Vector2(v24.X + h / 20, v24.Y + h / 28);
            //
            Vector2 v26 = new Vector2(v20.X + h / 2 + h / 20 + (h / 20) * 2 / 5, v20.Y - h / 20 - (h / 20) * 7 / 10);
            Vector2 v27 = new Vector2(v26.X + l1 / 3 - h / 16, v26.Y);
            //
            Vector2 v28 = new Vector2(v25.X + h / 60, v27.Y - h / 26);
            //
            Vector2 v29 = new Vector2(v25.X - h / 2 + h / 16, v25.Y - (h / 20) * 6 - (h / 20) * 3 / 10);
            //
            Vector2 v30 = new Vector2(v28.X + h / 2, v28.Y);
            //
            Vector2 v31 = new Vector2(v25.X - (h / 20) / 10, v25.Y + (h / 20) * 7);
            //
            Vector2 v32 = new Vector2(v28.X + h / 2, v1.Y);
            //
            Vector2 v33 = new Vector2(v14.X - h / 16, v4.Y);
            //X
            Vector2 v34 = new Vector2(v7.X + l - (h / 8) / Math.Tan(par / 2) - l1 + h / 5.56, v7.Y + h / 4);
            //
            Vector2 v35 = new Vector2(v4.X + l - (h / 8) / Math.Tan(par / 2) - l1, v4.Y);
            Vector2 v36 = new Vector2(v7.X + l - (h / 8) / Math.Tan(par / 2) - l1, v7.Y);
            //
            //
            Vector2 v37 = new Vector2(v36.X - h / 5, v36.Y);
            Vector2 v38 = new Vector2(v35.X - h / 5, v35.Y);
            Vector2 v39 = new Vector2(v15.X - h / 5, v15.Y);
            Vector2 v40 = new Vector2(v13.X - h / 5, v13.Y);
            // 线段
            //主视图

            Vector2[] Line1 = { v2, v3 };
            fun.drawBLine(dxf, Line1, 0.12, contour);
            Vector2[] Line2 = { v2, v4 };
            fun.drawBLine(dxf, Line2, 0.12, contour);
            Vector2[] Line3 = { v5, v4 };
            fun.drawBLine(dxf, Line3, 0.12, contour);
            //Vector2[] Line4 = { v5, v6 };
            //fun.drawBLine(dxf, Line4, 0.12, contour);
            Vector2[] Line5 = { v7, v3 };
            fun.drawBLine(dxf, Line5, 0.12, contour);
            Vector2[] Line6 = { v7, v8 };
            fun.drawBLine(dxf, Line6, 0.12, contour);
            //Vector2[] Line7 = { v9, v8 };
            //fun.drawBLine(dxf, Line7, 0.12, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            Arc1.Vertexes.Add(new LwPolylineVertex(v8));
            Arc1.Vertexes[0].Bulge = Math.Tan(par / 4.2);
            fun.PolyFill(dxf, Arc1, 0.08, contour);
            //
            //
            Vector2[] Line7 = { v7, v36 };
            fun.drawBLine(dxf, Line7, 0.12, contour);
            Vector2[] Line8 = { v8, v13 };
            fun.drawBLine(dxf, Line8, 0.12, contour);
            Vector2[] Line9 = { v4, v35 };
            fun.drawBLine(dxf, Line9, 0.12, contour);
            Vector2[] Line10 = { v5, v15 };
            fun.drawBLine(dxf, Line10, 0.12, contour);
            //
            //Vector2[] Line11 = { v16, v12 };
            //fun.drawBLine(dxf, Line11, 0.12, contour);
            //Vector2[] Line12 = { v17, v14 };
            //fun.drawBLine(dxf, Line12, 0.12, contour);
            //Vector2[] Line13 = { v18, v16 };
            //fun.drawBLine(dxf, Line13, 0.12, contour);
            //
            //Vector2[] Line14 = { v19, v17 };
            //fun.drawBLine(dxf, Line14, 0.12, contour);
            //Vector2[] Line15 = { v19, v18 };
            //fun.drawBLine(dxf, Line15, 0.12, contour);
            //Vector2[] Line16 = { v20, v12 };
            //fun.drawBLine(dxf, Line16, 0.12, contour);
            //Vector2[] Line17 = { v21, v14 };
            //fun.drawBLine(dxf, Line17, 0.12, contour);
            //LwPolyline Arc2 = new LwPolyline();
            //Arc2.Vertexes.Add(new LwPolylineVertex(v18));
            //Arc2.Vertexes.Add(new LwPolylineVertex(v20));
            //Arc2.Vertexes[0].Bulge = Math.Tan(par / 6);
            //fun.PolyFill(dxf, Arc2, 0.08, contour);
            //LwPolyline Arc3 = new LwPolyline();
            //Arc3.Vertexes.Add(new LwPolylineVertex(v19));
            //Arc3.Vertexes.Add(new LwPolylineVertex(v21));
            //Arc3.Vertexes[0].Bulge = -Math.Tan(par / 6);
            //fun.PolyFill(dxf, Arc3, 0.08, contour);
            //Vector2[] Line18 = { v21, v20 };
            //fun.drawBLine(dxf, Line18, 0.12, contour);
            //Vector2[] Line19 = { v22, v21 };
            //fun.drawBLine(dxf, Line19, 0.12, contour);
            //Vector2[] Line20 = { v22, v23 };
            //fun.drawBLine(dxf, Line20, 0.12, contour);
            //Vector2[] Line21 = { v24, v23 };
            //fun.drawBLine(dxf, Line21, 0.12, contour);
            //Vector2[] Line22 = { v26, v20 };
            //fun.drawBLine(dxf, Line22, 0.12, contour);
            //Vector2[] Line23 = { v26, v27 };
            //fun.drawBLine(dxf, Line23, 0.12, contour);
            //Vector2[] Line24 = { v25, v28 };
            //fun.drawBLine(dxf, Line24, 0.12, contour);
            //Vector2[] Line25 = { v25, v29 };
            //fun.drawBLine(dxf, Line25, 0.12, contour);
            //Vector2[] Line26 = { v28, v29 };
            //fun.drawBLine(dxf, Line26, 0.12, contour);
            //Vector2[] Line27 = { v28, v30 };
            //fun.drawBLine(dxf, Line27, 0.08, skdimensioning);
            //Vector2[] Line28 = { v25, v31 };
            //fun.drawBLine(dxf, Line28, 0.08, skdimensioning);
            //Vector2[] Line29 = { v14, v35 };
            //fun.drawBLine(dxf, Line29, 0.12, contour);
            //Vector2[] Line30 = { v12, v36 };
            //fun.drawBLine(dxf, Line30, 0.12, contour);
            //LwPolyline poly1 = new LwPolyline();
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v34, 0, (h / 16))));
            //poly1.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v34, Math.PI, (h / 16))));
            //poly1.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v34, 0, (h / 16))));
            //fun.PolyFill(dxf, poly1, 0.08, contour);
            //Vector2[] Line31 = { v37, v36 };
            //fun.drawBLine(dxf, Line31, 0.12, contour);
            //Vector2[] Line32 = { v38, v35 };
            //fun.drawBLine(dxf, Line32, 0.12, contour);
            ////Vector2[] Line33 = { v39, v15 };
            ////fun.drawBLine(dxf, Line33, 0.12, contour);
            ////Vector2[] Line34 = { v40, v13 };
            ////fun.drawBLine(dxf, Line34, 0.12, contour);
            //Vector2[] Line35 = { v38, v37 };
            //fun.drawBLine(dxf, Line35, 0.12, contour);
            //Vector2[] Line36 = { v24, v27 };
            //fun.drawBLine(dxf, Line36, 0.12, contour);
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint19(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 20;
            double pi = Math.PI;
            double par = 93 * pi / 180;
            double l = 180;
            double l1 = 30;
            string path = Convert.ToString(data["path"]);
            //主视图
            //图三
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h / 2 - h / 8);
            Vector2 v3 = new Vector2(v1.X, v1.Y - h / 2 + h / 8);
            Vector2 v4 = new Vector2(v2.X + (h / 8) / Math.Tan(par / 2), v2.Y + h / 8 + h / 30);
            Vector2 v5 = new Vector2(v4.X, v4.Y - h / 4);
            Vector2 v6 = new Vector2(v5.X - (h / 8) / Math.Tan(par / 2), v5.Y - h / 8);
            Vector2 v7 = new Vector2(v3.X + (h / 8) / Math.Tan(par / 2), v3.Y - h / 8 - h / 30);
            Vector2 v8 = new Vector2(v7.X, v7.Y + h / 4);
            Vector2 v9 = new Vector2(v8.X - (h / 8) / Math.Tan(par / 2), v8.Y + h / 8);
            //
            Vector2 v10 = new Vector2(v5.X - ((h / 8) / Math.Tan(par / 2)) / 2, v5.Y - (h / 8) / 2);
            Vector2 v11 = new Vector2(v8.X - ((h / 8) / Math.Tan(par / 2)) / 2, v8.Y + (h / 8) / 2);
            //
            Vector2 v12 = new Vector2(v7.X + l - (h / 8) / Math.Tan(par / 2) - l1, v3.Y - h / 8);
            Vector2 v13 = new Vector2(v8.X + l - (h / 8) / Math.Tan(par / 2) - l1, v8.Y);
            Vector2 v14 = new Vector2(v4.X + l - (h / 8) / Math.Tan(par / 2) - l1, v2.Y + h / 8);
            Vector2 v15 = new Vector2(v5.X + l - (h / 8) / Math.Tan(par / 2) - l1, v5.Y);
            //前端刀口
            Vector2 v16 = new Vector2(v12.X, v12.Y + h / 3.3);
            Vector2 v17 = new Vector2(v14.X, v2.Y + h / 8 + h / 30 - h / 3.3);
            Vector2 v18 = new Vector2(v16.X + h / 20, v16.Y);
            Vector2 v19 = new Vector2(v17.X + h / 20, v17.Y);
            //
            Vector2 v20 = new Vector2(v12.X + l1 / 3, v12.Y);
            Vector2 v21 = new Vector2(v14.X + l1 / 3, v2.Y + h / 8);
            Vector2 v22 = new Vector2(v21.X + l1 / 3, v21.Y);
            Vector2 v23 = new Vector2(v22.X + l1 / 3, v22.Y - h / 2 + h / 10);
            Vector2 v24 = new Vector2(v23.X, v23.Y - h / 5);
            //
            Vector2 v25 = new Vector2(v24.X + h / 20, v24.Y + h / 28);
            //
            Vector2 v26 = new Vector2(v20.X + h / 2 + h / 20 + (h / 20) * 2 / 5, v20.Y - h / 20 - (h / 20) * 7 / 10);
            Vector2 v27 = new Vector2(v26.X + l1 / 3 - h / 12, v26.Y);
            //
            Vector2 v28 = new Vector2(v25.X + h / 60, v27.Y - h / 26);
            //
            Vector2 v29 = new Vector2(v25.X - h / 2 + h / 16, v25.Y - (h / 20) * 6 - (h / 20) * 3 / 10);
            //
            Vector2 v30 = new Vector2(v28.X + h / 2, v28.Y);
            //
            Vector2 v31 = new Vector2(v25.X - (h / 20) / 10, v25.Y + (h / 20) * 7);
            //
            Vector2 v32 = new Vector2(v28.X + h / 2, v1.Y);
            //
            Vector2 v33 = new Vector2(v14.X - h / 16, v4.Y);
            //X
            Vector2 v34 = new Vector2(v7.X + l - (h / 8) / Math.Tan(par / 2) - l1 + h / 5.56, v7.Y + h / 4);
            //
            Vector2 v35 = new Vector2(v4.X + l - (h / 8) / Math.Tan(par / 2) - l1, v4.Y);
            Vector2 v36 = new Vector2(v7.X + l - (h / 8) / Math.Tan(par / 2) - l1, v7.Y);
            // 线段
            //主视图

            //Vector2[] Line1 = { v2, v3 };
            //fun.drawBLine(dxf, Line1, 0.12, contour);
            //Vector2[] Line2 = { v2, v4 };
            //fun.drawBLine(dxf, Line2, 0.12, contour);
            //Vector2[] Line3 = { v5, v4 };
            //fun.drawBLine(dxf, Line3, 0.12, contour);
            ////Vector2[] Line4 = { v5, v6 };
            ////fun.drawBLine(dxf, Line4, 0.12, contour);
            //Vector2[] Line5 = { v7, v3 };
            //fun.drawBLine(dxf, Line5, 0.12, contour);
            //Vector2[] Line6 = { v7, v8 };
            //fun.drawBLine(dxf, Line6, 0.12, contour);
            ////Vector2[] Line7 = { v9, v8 };
            ////fun.drawBLine(dxf, Line7, 0.12, contour);
            //LwPolyline Arc1 = new LwPolyline();
            //Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            //Arc1.Vertexes.Add(new LwPolylineVertex(v8));
            //Arc1.Vertexes[0].Bulge = Math.Tan(par / 4.2);
            //fun.PolyFill(dxf, Arc1, 0.08, contour);
            //Vector2[] Line7 = { v7, v36 };
            //fun.drawBLine(dxf, Line7, 0.12, contour);
            //Vector2[] Line8 = { v8, v13 };
            //fun.drawBLine(dxf, Line8, 0.12, contour);
            //Vector2[] Line9 = { v4, v35 };
            //fun.drawBLine(dxf, Line9, 0.12, contour);
            //Vector2[] Line10 = { v5, v15 };
            //fun.drawBLine(dxf, Line10, 0.12, contour);
            //Vector2[] Line11 = { v16, v12 };
            //fun.drawBLine(dxf, Line11, 0.12, contour);
            //Vector2[] Line12 = { v17, v14 };
            //fun.drawBLine(dxf, Line12, 0.12, contour);
            //Vector2[] Line13 = { v18, v16 };
            //fun.drawBLine(dxf, Line13, 0.12, contour);
            //Vector2[] Line14 = { v19, v17 };
            //fun.drawBLine(dxf, Line14, 0.12, contour);
            //Vector2[] Line15 = { v19, v18 };
            //fun.drawBLine(dxf, Line15, 0.12, contour);
            //Vector2[] Line16 = { v20, v12 };
            //fun.drawBLine(dxf, Line16, 0.12, contour);
            //Vector2[] Line17 = { v21, v14 };
            //fun.drawBLine(dxf, Line17, 0.12, contour);
            //LwPolyline Arc2 = new LwPolyline();
            //Arc2.Vertexes.Add(new LwPolylineVertex(v18));
            //Arc2.Vertexes.Add(new LwPolylineVertex(v20));
            //Arc2.Vertexes[0].Bulge = Math.Tan(par / 6);
            //fun.PolyFill(dxf, Arc2, 0.08, contour);
            //LwPolyline Arc3 = new LwPolyline();
            //Arc3.Vertexes.Add(new LwPolylineVertex(v19));
            //Arc3.Vertexes.Add(new LwPolylineVertex(v21));
            //Arc3.Vertexes[0].Bulge = -Math.Tan(par / 6);
            //fun.PolyFill(dxf, Arc3, 0.08, contour);
            //Vector2[] Line18 = { v21, v20 };
            //fun.drawBLine(dxf, Line18, 0.12, contour);
            //Vector2[] Line19 = { v22, v21 };
            //fun.drawBLine(dxf, Line19, 0.12, contour);
            //Vector2[] Line20 = { v22, v23 };
            //fun.drawBLine(dxf, Line20, 0.12, contour);
            //Vector2[] Line21 = { v24, v23 };
            //fun.drawBLine(dxf, Line21, 0.12, contour);
            //Vector2[] Line22 = { v26, v20 };
            //fun.drawBLine(dxf, Line22, 0.12, contour);
            //Vector2[] Line23 = { v26, v27 };
            //fun.drawBLine(dxf, Line23, 0.12, contour);
            //Vector2[] Line24 = { v25, v28 };
            //fun.drawBLine(dxf, Line24, 0.12, contour);
            //Vector2[] Line25 = { v25, v29 };
            //fun.drawBLine(dxf, Line25, 0.12, contour);
            //Vector2[] Line26 = { v28, v29 };
            //fun.drawBLine(dxf, Line26, 0.12, contour);
            //Vector2[] Line27 = { v28, v30 };
            //fun.drawBLine(dxf, Line27, 0.08, skdimensioning);
            //Vector2[] Line28 = { v25, v31 };
            //fun.drawBLine(dxf, Line28, 0.08, skdimensioning);
            //Vector2[] Line29 = { v14, v35 };
            //fun.drawBLine(dxf, Line29, 0.12, contour);
            //Vector2[] Line30 = { v12, v36 };
            //fun.drawBLine(dxf, Line30, 0.12, contour);
            ////
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v1.X + l1 / 1.3 + l, v1.Y), new Vector2(v1.X - h / 10, v1.Y) }, centre, Linetype.Center);
            //
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 1;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 1.8;
            double offset = 6;
            LinearDimension dim1 = new LinearDimension(new Line(v4, v7), offset * 2, 90, dimensionStyle);
            dim1.UserText = "Φ20 ";
            dxf.AddEntity(dim1);
            LinearDimension dim2 = new LinearDimension(new Line(v1, v28), offset * 5, 180, dimensionStyle);
            dim2.UserText = "180 ";
            dxf.AddEntity(dim2);
            //Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v28, v30), new Line(v25, v31), offset * 6, dimensionStyle);
            //angdim1.UserText = "93°";
            //dxf.AddEntity(angdim1);
            //LinearDimension dim3 = new LinearDimension(new Line(v30, v32), offset * 2, 270, dimensionStyle);
            //dim3.UserText = "13 ";
            //dxf.AddEntity(dim3);
            //LinearDimension dim4 = new LinearDimension(new Line(v33, v28), offset * 4, 180, dimensionStyle);
            //dim4.UserText = "30 ";
            //dxf.AddEntity(dim4);

            //LwPolyline poly1 = new LwPolyline();
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v34, 0, (h / 16))));
            //poly1.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v34, Math.PI, (h / 16))));
            //poly1.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v34, 0, (h / 16))));
            //fun.PolyFill(dxf, poly1, 0.08, contour);
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint20(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 20;
            double pi = Math.PI;
            double par = 93 * pi / 180;
            double l = 180;
            double l1 = 30;
            string path = Convert.ToString(data["path"]);
            //主视图
            //图三
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h / 2 - h / 8);
            Vector2 v3 = new Vector2(v1.X, v1.Y - h / 2 + h / 8);
            Vector2 v4 = new Vector2(v2.X + (h / 8) / Math.Tan(par / 2), v2.Y + h / 8 + h / 30);
            Vector2 v5 = new Vector2(v4.X, v4.Y - h / 4);
            Vector2 v6 = new Vector2(v5.X - (h / 8) / Math.Tan(par / 2), v5.Y - h / 8);
            Vector2 v7 = new Vector2(v3.X + (h / 8) / Math.Tan(par / 2), v3.Y - h / 8 - h / 30);
            Vector2 v8 = new Vector2(v7.X, v7.Y + h / 4);
            Vector2 v9 = new Vector2(v8.X - (h / 8) / Math.Tan(par / 2), v8.Y + h / 8);
            //
            Vector2 v10 = new Vector2(v5.X - ((h / 8) / Math.Tan(par / 2)) / 2, v5.Y - (h / 8) / 2);
            Vector2 v11 = new Vector2(v8.X - ((h / 8) / Math.Tan(par / 2)) / 2, v8.Y + (h / 8) / 2);
            //
            Vector2 v12 = new Vector2(v7.X + l - (h / 8) / Math.Tan(par / 2) - l1, v3.Y - h / 8);
            Vector2 v13 = new Vector2(v8.X + l - (h / 8) / Math.Tan(par / 2) - l1, v8.Y);
            Vector2 v14 = new Vector2(v4.X + l - (h / 8) / Math.Tan(par / 2) - l1, v2.Y + h / 8);
            Vector2 v15 = new Vector2(v5.X + l - (h / 8) / Math.Tan(par / 2) - l1, v5.Y);
            //前端刀口
            Vector2 v16 = new Vector2(v12.X, v12.Y + h / 3.3);
            Vector2 v17 = new Vector2(v14.X, v2.Y + h / 8 + h / 30 - h / 3.3);
            Vector2 v18 = new Vector2(v16.X + h / 20, v16.Y);
            Vector2 v19 = new Vector2(v17.X + h / 20, v17.Y);
            //
            Vector2 v20 = new Vector2(v12.X + l1 / 3, v12.Y);
            Vector2 v21 = new Vector2(v14.X + l1 / 3, v2.Y + h / 8);
            Vector2 v22 = new Vector2(v21.X + l1 / 3, v21.Y);
            Vector2 v23 = new Vector2(v22.X + l1 / 3, v22.Y - h / 2 + h / 10);
            Vector2 v24 = new Vector2(v23.X, v23.Y - h / 5);
            //
            Vector2 v25 = new Vector2(v24.X + h / 20, v24.Y + h / 28);
            //
            Vector2 v26 = new Vector2(v20.X + h / 2 + h / 20 + (h / 20) * 2 / 5, v20.Y - h / 20 - (h / 20) * 7 / 10);
            Vector2 v27 = new Vector2(v26.X + l1 / 3 - h / 12, v26.Y);
            //
            Vector2 v28 = new Vector2(v25.X + h / 60, v27.Y - h / 26);
            //
            Vector2 v29 = new Vector2(v25.X - h / 2 + h / 16, v25.Y - (h / 20) * 6 - (h / 20) * 3 / 10);
            //
            Vector2 v30 = new Vector2(v28.X + h / 2, v28.Y);
            //
            Vector2 v31 = new Vector2(v25.X - (h / 20) / 10, v25.Y + (h / 20) * 7);
            //
            Vector2 v32 = new Vector2(v28.X + h / 2, v1.Y);
            //
            Vector2 v33 = new Vector2(v14.X - h / 16, v4.Y);
            //X
            Vector2 v34 = new Vector2(v7.X + l - (h / 8) / Math.Tan(par / 2) - l1 + h / 5.56, v7.Y + h / 4);
            //
            Vector2 v35 = new Vector2(v4.X + l - (h / 8) / Math.Tan(par / 2) - l1, v4.Y);
            Vector2 v36 = new Vector2(v7.X + l - (h / 8) / Math.Tan(par / 2) - l1, v7.Y);
            // 线段
            //主视图

            //Vector2[] Line1 = { v2, v3 };
            //fun.drawBLine(dxf, Line1, 0.12, contour);
            //Vector2[] Line2 = { v2, v4 };
            //fun.drawBLine(dxf, Line2, 0.12, contour);
            //Vector2[] Line3 = { v5, v4 };
            //fun.drawBLine(dxf, Line3, 0.12, contour);
            ////Vector2[] Line4 = { v5, v6 };
            ////fun.drawBLine(dxf, Line4, 0.12, contour);
            //Vector2[] Line5 = { v7, v3 };
            //fun.drawBLine(dxf, Line5, 0.12, contour);
            //Vector2[] Line6 = { v7, v8 };
            //fun.drawBLine(dxf, Line6, 0.12, contour);
            ////Vector2[] Line7 = { v9, v8 };
            ////fun.drawBLine(dxf, Line7, 0.12, contour);
            //LwPolyline Arc1 = new LwPolyline();
            //Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            //Arc1.Vertexes.Add(new LwPolylineVertex(v8));
            //Arc1.Vertexes[0].Bulge = Math.Tan(par / 4.2);
            //fun.PolyFill(dxf, Arc1, 0.08, contour);
            //Vector2[] Line7 = { v7, v36 };
            //fun.drawBLine(dxf, Line7, 0.12, contour);
            //Vector2[] Line8 = { v8, v13 };
            //fun.drawBLine(dxf, Line8, 0.12, contour);
            //Vector2[] Line9 = { v4, v35 };
            //fun.drawBLine(dxf, Line9, 0.12, contour);
            //Vector2[] Line10 = { v5, v15 };
            //fun.drawBLine(dxf, Line10, 0.12, contour);
            //Vector2[] Line11 = { v16, v12 };
            //fun.drawBLine(dxf, Line11, 0.12, contour);
            //Vector2[] Line12 = { v17, v14 };
            //fun.drawBLine(dxf, Line12, 0.12, contour);
            //Vector2[] Line13 = { v18, v16 };
            //fun.drawBLine(dxf, Line13, 0.12, contour);
            //Vector2[] Line14 = { v19, v17 };
            //fun.drawBLine(dxf, Line14, 0.12, contour);
            //Vector2[] Line15 = { v19, v18 };
            //fun.drawBLine(dxf, Line15, 0.12, contour);
            //Vector2[] Line16 = { v20, v12 };
            //fun.drawBLine(dxf, Line16, 0.12, contour);
            //Vector2[] Line17 = { v21, v14 };
            //fun.drawBLine(dxf, Line17, 0.12, contour);
            //LwPolyline Arc2 = new LwPolyline();
            //Arc2.Vertexes.Add(new LwPolylineVertex(v18));
            //Arc2.Vertexes.Add(new LwPolylineVertex(v20));
            //Arc2.Vertexes[0].Bulge = Math.Tan(par / 6);
            //fun.PolyFill(dxf, Arc2, 0.08, contour);
            //LwPolyline Arc3 = new LwPolyline();
            //Arc3.Vertexes.Add(new LwPolylineVertex(v19));
            //Arc3.Vertexes.Add(new LwPolylineVertex(v21));
            //Arc3.Vertexes[0].Bulge = -Math.Tan(par / 6);
            //fun.PolyFill(dxf, Arc3, 0.08, contour);
            //Vector2[] Line18 = { v21, v20 };
            //fun.drawBLine(dxf, Line18, 0.12, contour);
            //Vector2[] Line19 = { v22, v21 };
            //fun.drawBLine(dxf, Line19, 0.12, contour);
            //Vector2[] Line20 = { v22, v23 };
            //fun.drawBLine(dxf, Line20, 0.12, contour);
            //Vector2[] Line21 = { v24, v23 };
            //fun.drawBLine(dxf, Line21, 0.12, contour);
            //Vector2[] Line22 = { v26, v20 };
            //fun.drawBLine(dxf, Line22, 0.12, contour);
            //Vector2[] Line23 = { v26, v27 };
            //fun.drawBLine(dxf, Line23, 0.12, contour);
            //Vector2[] Line24 = { v25, v28 };
            //fun.drawBLine(dxf, Line24, 0.12, contour);
            //Vector2[] Line25 = { v25, v29 };
            //fun.drawBLine(dxf, Line25, 0.12, contour);
            //Vector2[] Line26 = { v28, v29 };
            //fun.drawBLine(dxf, Line26, 0.12, contour);
            //Vector2[] Line27 = { v28, v30 };
            //fun.drawBLine(dxf, Line27, 0.08, skdimensioning);
            //Vector2[] Line28 = { v25, v31 };
            //fun.drawBLine(dxf, Line28, 0.08, skdimensioning);
            //Vector2[] Line29 = { v14, v35 };
            //fun.drawBLine(dxf, Line29, 0.12, contour);
            //Vector2[] Line30 = { v12, v36 };
            //fun.drawBLine(dxf, Line30, 0.12, contour);
            ////
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v1.X + l1 / 1.3 + l, v1.Y), new Vector2(v1.X - h / 10, v1.Y) },0.08, centre, Linetype.Center);
            //
            //DimensionStyle dimensionStyle = fun.CreateDimStyle();
            //dimensionStyle.ArrowSize = 1;
            //dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.TextHeight = 1.8;
            //double offset = 6;
            //LinearDimension dim1 = new LinearDimension(new Line(v4, v7), offset * 2, 90, dimensionStyle);
            //dim1.UserText = "Φ20 ";
            //dxf.AddEntity(dim1);
            //LinearDimension dim2 = new LinearDimension(new Line(v1, v28), offset * 5, 180, dimensionStyle);
            //dim2.UserText = "180 ";
            //dxf.AddEntity(dim2);
            //Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v28, v30), new Line(v25, v31), offset * 6, dimensionStyle);
            //angdim1.UserText = "93°";
            //dxf.AddEntity(angdim1);
            //LinearDimension dim3 = new LinearDimension(new Line(v30, v32), offset * 2, 270, dimensionStyle);
            //dim3.UserText = "13 ";
            //dxf.AddEntity(dim3);
            //LinearDimension dim4 = new LinearDimension(new Line(v33, v28), offset * 4, 180, dimensionStyle);
            //dim4.UserText = "30 ";
            //dxf.AddEntity(dim4);

            //LwPolyline poly1 = new LwPolyline();
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v34, 0, (h / 16))));
            //poly1.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v34, Math.PI, (h / 16))));
            //poly1.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v34, 0, (h / 16))));
            //fun.PolyFill(dxf, poly1, 0.08, contour);
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        //
        //
        //
        public static void Matingpoint22(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 16;
            double pi = Math.PI;
            double epsr = 75 * pi / 180;
            double l = 100;
            double l1 = 30;
            double h1 = 17;
            double l2 = 25;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h);
            Vector2 v3 = new Vector2(v1.X + l - Math.Tan(pi / 2 - epsr) * h1, v1.Y);
            Vector2 v4 = new Vector2(v2.X + l - l2, v2.Y);
            Vector2 v5 = new Vector2(v4.X + (Math.Tan(pi / 2 - epsr) * 8), v1.Y + h1 + (Math.Tan(pi / 2 - epsr) * 16 * Math.Tan(pi / 2 - epsr)));
            //
            Vector2 v6 = new Vector2(v4.X, v4.Y - h);
            Vector2 v7 = new Vector2(v5.X, v1.Y);
            //刀口前
            Vector2 v8 = new Vector2(v4.X + l2 - (Math.Tan(pi / 2 - epsr) * 16) - (Math.Tan(pi / 2 - epsr) * 17), v5.Y);
            //
            Vector2 v9 = new Vector2(v8.X - Math.Tan(pi / 2 - epsr) * 6, v8.Y - Math.Tan(pi / 2 - epsr) * 25);
            Vector2 v10 = new Vector2(v8.X + Math.Tan(pi / 2 - epsr) * 5, v8.Y + (Math.Tan(pi / 2 - epsr) * 3));
            //
            Vector2 v11 = new Vector2(v9.X + Math.Tan(pi / 2 - epsr) * 3, v9.Y - (Math.Tan(pi / 2 - epsr) * 5));
            Vector2 v12 = new Vector2(v11.X + Math.Tan(pi / 2 - epsr) * 25, v11.Y - Math.Tan(pi / 2 - epsr) * 6);
            //
            Vector2 v13 = new Vector2(v12.X + Math.Tan(pi / 2 - epsr) * 5, v12.Y + (Math.Tan(pi / 2 - epsr) * 3));
            Vector2 v14 = new Vector2(v13.X + Math.Tan(pi / 2 - epsr) * 6, v13.Y + Math.Tan(pi / 2 - epsr) * 25);
            //
            Vector2 v15 = new Vector2(v14.X - Math.Tan(pi / 2 - epsr) * 3, v14.Y + (Math.Tan(pi / 2 - epsr) * 5));
            //
            Vector2 v16 = new Vector2(v4.X - h / 5, v4.Y);
            //
            Vector2 v17 = new Vector2(v14.X, v14.Y + h / 2);
            //
            Vector2 v18 = new Vector2(v10.X - Math.Tan(pi / 2 - epsr) * 18, v10.Y + Math.Tan(pi / 2 - epsr) * 5);
            ////下半部分
            ///
            Vector2 v19 = new Vector2(v1.X, v1.Y - l2);
            Vector2 v20 = new Vector2(v19.X, v19.Y - h);
            Vector2 v21 = new Vector2(v19.X + l - Math.Tan(pi / 2 - epsr) * h1, v19.Y);
            Vector2 v22 = new Vector2(v20.X + l - l2, v20.Y);
            Vector2 v23 = new Vector2(v22.X + (Math.Tan(pi / 2 - epsr) * 8), v19.Y - h1 - (Math.Tan(pi / 2 - epsr) * 16 * Math.Tan(pi / 2 - epsr)));
            //
            Vector2 v24 = new Vector2(v22.X, v22.Y + h);
            Vector2 v25 = new Vector2(v23.X, v19.Y);
            //
            Vector2 v26 = new Vector2(v22.X + l2 - (Math.Tan(pi / 2 - epsr) * 16) - (Math.Tan(pi / 2 - epsr) * 17), v23.Y);
            //
            Vector2 v27 = new Vector2(v26.X - Math.Tan(pi / 2 - epsr) * 6, v26.Y + Math.Tan(pi / 2 - epsr) * 25);
            Vector2 v28 = new Vector2(v26.X + Math.Tan(pi / 2 - epsr) * 5, v26.Y - (Math.Tan(pi / 2 - epsr) * 3));
            //
            Vector2 v29 = new Vector2(v27.X + Math.Tan(pi / 2 - epsr) * 3, v27.Y + (Math.Tan(pi / 2 - epsr) * 5));
            Vector2 v30 = new Vector2(v29.X + Math.Tan(pi / 2 - epsr) * 25, v29.Y + Math.Tan(pi / 2 - epsr) * 6);
            //
            Vector2 v31 = new Vector2(v30.X + Math.Tan(pi / 2 - epsr) * 5, v30.Y - (Math.Tan(pi / 2 - epsr) * 3));
            Vector2 v32 = new Vector2(v31.X + Math.Tan(pi / 2 - epsr) * 6, v31.Y - Math.Tan(pi / 2 - epsr) * 25);
            //
            Vector2 v33 = new Vector2(v32.X - Math.Tan(pi / 2 - epsr) * 3, v32.Y - (Math.Tan(pi / 2 - epsr) * 5));
            //
            Vector2 v34 = new Vector2(v22.X - h / 5, v22.Y);
            //
            Vector2 v35 = new Vector2(v32.X, v32.Y - h / 2);
            //
            Vector2 v36 = new Vector2(v28.X - Math.Tan(pi / 2 - epsr) * 18, v28.Y - Math.Tan(pi / 2 - epsr) * 5);
            // 线段
            //主视图
            Vector2[] Line1 = { v1, v2 };
            fun.drawBLine(dxf, Line1, 0.12, contour);
            Vector2[] Line2 = { v1, v3 };
            fun.drawBLine(dxf, Line2, 0.12, contour);
            Vector2[] Line3 = { v2, v4 };
            fun.drawBLine(dxf, Line3, 0.12, contour);
            Vector2[] Line4 = { v5, v4 };
            fun.drawBLine(dxf, Line4, 0.12, contour);
            Vector2[] Line5 = { v6, v4 };
            fun.drawBLine(dxf, Line5, 0.12, contour);
            Vector2[] Line6 = { v5, v7 };
            fun.drawBLine(dxf, Line6, 0.12, contour);
            Vector2[] Line7 = { v5, v8 };
            fun.drawBLine(dxf, Line7, 0.12, contour);
            Vector2[] Line8 = { v9, v8 };
            fun.drawBLine(dxf, Line8, 0.12, contour);
            LwPolyline Arc8 = new LwPolyline();
            Arc8.Vertexes.Add(new LwPolylineVertex(v8));
            Arc8.Vertexes.Add(new LwPolylineVertex(v10));
            Arc8.Vertexes[0].Bulge = -Math.Tan(pi / 2 - epsr) * 1.6;
            fun.PolyFill(dxf, Arc8, 0.12, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v9));
            Arc1.Vertexes.Add(new LwPolylineVertex(v11));
            Arc1.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            fun.PolyFill(dxf, Arc1, 0.12, contour);
            Vector2[] Line9 = { v11, v12 };
            fun.drawBLine(dxf, Line9, 0.12, contour);
            Vector2[] Line10 = { v3, v12 };
            fun.drawBLine(dxf, Line10, 0.12, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v12));
            Arc2.Vertexes.Add(new LwPolylineVertex(v13));
            Arc2.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            fun.PolyFill(dxf, Arc2, 0.12, contour);
            Vector2[] Line11 = { v14, v13 };
            fun.drawBLine(dxf, Line11, 0.12, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v14));
            Arc3.Vertexes.Add(new LwPolylineVertex(v15));
            Arc3.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            fun.PolyFill(dxf, Arc3, 0.12, contour);
            Vector2[] Line12 = { v15, v10 };
            fun.drawBLine(dxf, Line12, 0.12, contour);
            Vector2[] Line13 = { v17, v14 };
            fun.drawBLine(dxf, Line13, 0.1, skdimensioning);
            Vector2[] Line14 = { v18, v10 };
            fun.drawBLine(dxf, Line14, 0.1, skdimensioning);
            //
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 1;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 1.8;
            double offset = 6;
            LinearDimension dim1 = new LinearDimension(new Line(v1, v2), offset * 2, 90, dimensionStyle);
            dim1.UserText = "16 ";
            dxf.AddEntity(dim1);
            LinearDimension dim2 = new LinearDimension(new Line(v14, v2), offset * 8, 360, dimensionStyle);
            dim2.UserText = "100 ";
            dxf.AddEntity(dim2);
            LinearDimension dim3 = new LinearDimension(new Line(v15, v3), offset * 2, 270, dimensionStyle);
            dim3.UserText = "17 ";
            dxf.AddEntity(dim3);
            LinearDimension dim4 = new LinearDimension(new Line(v14, v4), offset * 4, 360, dimensionStyle);
            dim4.UserText = "25 ";
            dxf.AddEntity(dim4);
            LinearDimension dim5 = new LinearDimension(new Line(v16, v14), offset * 6, 360, dimensionStyle);
            dim5.UserText = "30 ";
            dxf.AddEntity(dim5);
            Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v14, v17), new Line(v10, v18), offset * 3, dimensionStyle);
            angdim1.UserText = "75°";
            dxf.AddEntity(angdim1);
            ////
            ///
            Vector2[] Line15 = { v19, v20 };
            fun.drawBLine(dxf, Line15, 0.12, contour);
            Vector2[] Line16 = { v19, v21 };
            fun.drawBLine(dxf, Line16, 0.12, contour);
            Vector2[] Line17 = { v20, v22 };
            fun.drawBLine(dxf, Line17, 0.12, contour);
            Vector2[] Line18 = { v23, v22 };
            fun.drawBLine(dxf, Line18, 0.12, contour);
            Vector2[] Line19 = { v24, v22 };
            fun.drawBLine(dxf, Line19, 0.12, contour);
            Vector2[] Line20 = { v23, v25 };
            fun.drawBLine(dxf, Line20, 0.12, contour);
            Vector2[] Line21 = { v23, v26 };
            fun.drawBLine(dxf, Line21, 0.12, contour);
            Vector2[] Line22 = { v27, v26 };
            fun.drawBLine(dxf, Line22, 0.12, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v26));
            Arc4.Vertexes.Add(new LwPolylineVertex(v28));
            Arc4.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            fun.PolyFill(dxf, Arc4, 0.12, contour);
            LwPolyline Arc5 = new LwPolyline();
            Arc5.Vertexes.Add(new LwPolylineVertex(v27));
            Arc5.Vertexes.Add(new LwPolylineVertex(v29));
            Arc5.Vertexes[0].Bulge = -Math.Tan(pi / 2 - epsr) * 1.6;
            fun.PolyFill(dxf, Arc5, 0.12, contour);
            Vector2[] Line23 = { v29, v30 };
            fun.drawBLine(dxf, Line23, 0.12, contour);
            Vector2[] Line24 = { v21, v30 };
            fun.drawBLine(dxf, Line24, 0.12, contour);
            LwPolyline Arc6 = new LwPolyline();
            Arc6.Vertexes.Add(new LwPolylineVertex(v31));
            Arc6.Vertexes.Add(new LwPolylineVertex(v30));
            Arc6.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            fun.PolyFill(dxf, Arc6, 0.12, contour);
            Vector2[] Line25 = { v31, v32 };
            fun.drawBLine(dxf, Line25, 0.12, contour);
            LwPolyline Arc7 = new LwPolyline();
            Arc7.Vertexes.Add(new LwPolylineVertex(v32));
            Arc7.Vertexes.Add(new LwPolylineVertex(v33));
            Arc7.Vertexes[0].Bulge = -Math.Tan(pi / 2 - epsr) * 1.6;
            fun.PolyFill(dxf, Arc7, 0.12, contour);
            Vector2[] Line26 = { v28, v33 };
            fun.drawBLine(dxf, Line26, 0.12, contour);
            Vector2[] Line27 = { v35, v32 };
            fun.drawBLine(dxf, Line27, 0.1, skdimensioning);
            Vector2[] Line28 = { v36, v28 };
            fun.drawBLine(dxf, Line28, 0.1, skdimensioning);
            LinearDimension dim6 = new LinearDimension(new Line(v19, v20), offset * 2, 90, dimensionStyle);
            dim6.UserText = "16 ";
            dxf.AddEntity(dim6);
            LinearDimension dim7 = new LinearDimension(new Line(v32, v20), offset * 8, 180, dimensionStyle);
            dim7.UserText = "100 ";
            dxf.AddEntity(dim7);
            LinearDimension dim8 = new LinearDimension(new Line(v33, v21), offset * 2, 270, dimensionStyle);
            dim8.UserText = "17 ";
            dxf.AddEntity(dim8);
            LinearDimension dim9 = new LinearDimension(new Line(v32, v22), offset * 4, 180, dimensionStyle);
            dim9.UserText = "25 ";
            dxf.AddEntity(dim9);
            LinearDimension dim10 = new LinearDimension(new Line(v34, v32), offset * 6, 180, dimensionStyle);
            dim10.UserText = "30 ";
            dxf.AddEntity(dim10);
            Angular2LineDimension angdim2 = new Angular2LineDimension(new Line(v32, v35), new Line(v28, v36), offset * 2, dimensionStyle);
            angdim2.UserText = "75°";
            dxf.AddEntity(angdim2);
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint23(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 16;
            double pi = Math.PI;
            double epsr = 75 * pi / 180;
            double l = 100;
            double l1 = 30;
            double h1 = 17;
            double l2 = 25;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h);
            Vector2 v3 = new Vector2(v1.X + l - Math.Tan(pi / 2 - epsr) * h1, v1.Y);
            Vector2 v4 = new Vector2(v2.X + l - l2, v2.Y);
            Vector2 v5 = new Vector2(v4.X + (Math.Tan(pi / 2 - epsr) * 8), v1.Y + h1 + (Math.Tan(pi / 2 - epsr) * 16 * Math.Tan(pi / 2 - epsr)));
            //
            Vector2 v6 = new Vector2(v4.X, v4.Y - h);
            Vector2 v7 = new Vector2(v5.X, v1.Y);
            //刀口前
            Vector2 v8 = new Vector2(v4.X + l2 - (Math.Tan(pi / 2 - epsr) * 16) - (Math.Tan(pi / 2 - epsr) * 17), v5.Y);
            //
            Vector2 v9 = new Vector2(v8.X - Math.Tan(pi / 2 - epsr) * 6, v8.Y - Math.Tan(pi / 2 - epsr) * 25);
            Vector2 v10 = new Vector2(v8.X + Math.Tan(pi / 2 - epsr) * 5, v8.Y + (Math.Tan(pi / 2 - epsr) * 3));
            //
            Vector2 v11 = new Vector2(v9.X + Math.Tan(pi / 2 - epsr) * 3, v9.Y - (Math.Tan(pi / 2 - epsr) * 5));
            Vector2 v12 = new Vector2(v11.X + Math.Tan(pi / 2 - epsr) * 25, v11.Y - Math.Tan(pi / 2 - epsr) * 6);
            //
            Vector2 v13 = new Vector2(v12.X + Math.Tan(pi / 2 - epsr) * 5, v12.Y + (Math.Tan(pi / 2 - epsr) * 3));
            Vector2 v14 = new Vector2(v13.X + Math.Tan(pi / 2 - epsr) * 6, v13.Y + Math.Tan(pi / 2 - epsr) * 25);
            //
            Vector2 v15 = new Vector2(v14.X - Math.Tan(pi / 2 - epsr) * 3, v14.Y + (Math.Tan(pi / 2 - epsr) * 5));
            //
            Vector2 v16 = new Vector2(v4.X - h / 5, v4.Y);
            //
            Vector2 v17 = new Vector2(v14.X, v14.Y + h / 2);
            //
            Vector2 v18 = new Vector2(v10.X - Math.Tan(pi / 2 - epsr) * 18, v10.Y + Math.Tan(pi / 2 - epsr) * 5);
            //
            Vector2 v37 = new Vector2(v4.X - l2 / 5.5, v4.Y);
            Vector2 v38 = new Vector2(v3.X - l2, v3.Y);
            ////下半部分
            ///
            Vector2 v19 = new Vector2(v1.X, v1.Y - l2);
            Vector2 v20 = new Vector2(v19.X, v19.Y - h);
            Vector2 v21 = new Vector2(v19.X + l - Math.Tan(pi / 2 - epsr) * h1, v19.Y);
            Vector2 v22 = new Vector2(v20.X + l - l2, v20.Y);
            Vector2 v23 = new Vector2(v22.X + (Math.Tan(pi / 2 - epsr) * 8), v19.Y - h1 - (Math.Tan(pi / 2 - epsr) * 16 * Math.Tan(pi / 2 - epsr)));
            //
            Vector2 v24 = new Vector2(v22.X, v22.Y + h);
            Vector2 v25 = new Vector2(v23.X, v19.Y);
            //
            Vector2 v26 = new Vector2(v22.X + l2 - (Math.Tan(pi / 2 - epsr) * 16) - (Math.Tan(pi / 2 - epsr) * 17), v23.Y);
            //
            Vector2 v27 = new Vector2(v26.X - Math.Tan(pi / 2 - epsr) * 6, v26.Y + Math.Tan(pi / 2 - epsr) * 25);
            Vector2 v28 = new Vector2(v26.X + Math.Tan(pi / 2 - epsr) * 5, v26.Y - (Math.Tan(pi / 2 - epsr) * 3));
            //
            Vector2 v29 = new Vector2(v27.X + Math.Tan(pi / 2 - epsr) * 3, v27.Y + (Math.Tan(pi / 2 - epsr) * 5));
            Vector2 v30 = new Vector2(v29.X + Math.Tan(pi / 2 - epsr) * 25, v29.Y + Math.Tan(pi / 2 - epsr) * 6);
            //
            Vector2 v31 = new Vector2(v30.X + Math.Tan(pi / 2 - epsr) * 5, v30.Y - (Math.Tan(pi / 2 - epsr) * 3));
            Vector2 v32 = new Vector2(v31.X + Math.Tan(pi / 2 - epsr) * 6, v31.Y - Math.Tan(pi / 2 - epsr) * 25);
            //
            Vector2 v33 = new Vector2(v32.X - Math.Tan(pi / 2 - epsr) * 3, v32.Y - (Math.Tan(pi / 2 - epsr) * 5));
            //
            Vector2 v34 = new Vector2(v22.X - h / 5, v22.Y);
            //
            Vector2 v35 = new Vector2(v32.X, v32.Y - h / 2);
            //
            Vector2 v36 = new Vector2(v28.X - Math.Tan(pi / 2 - epsr) * 18, v28.Y - Math.Tan(pi / 2 - epsr) * 5);
            //
            Vector2 v39 = new Vector2(v22.X - l2 / 5.5, v22.Y);
            Vector2 v40 = new Vector2(v21.X - l2, v21.Y);
            // 线段
            //主视图
            //Vector2[] Line1 = { v1, v2 };
            //fun.drawBLine(dxf, Line1, 0.12, contour);
            //Vector2[] Line2 = { v1, v3 };
            //fun.drawBLine(dxf, Line2, 0.12, contour);
            //Vector2[] Line3 = { v2, v4 };
            //fun.drawBLine(dxf, Line3, 0.12, contour);
            Vector2[] Line4 = { v5, v4 };
            fun.drawBLine(dxf, Line4, 0.12, contour);
            Vector2[] Line5 = { v6, v4 };
            fun.drawBLine(dxf, Line5, 0.12, contour);
            Vector2[] Line6 = { v5, v7 };
            fun.drawBLine(dxf, Line6, 0.12, contour);
            Vector2[] Line7 = { v5, v8 };
            fun.drawBLine(dxf, Line7, 0.12, contour);
            Vector2[] Line8 = { v9, v8 };
            fun.drawBLine(dxf, Line8, 0.12, contour);
            LwPolyline Arc8 = new LwPolyline();
            Arc8.Vertexes.Add(new LwPolylineVertex(v8));
            Arc8.Vertexes.Add(new LwPolylineVertex(v10));
            Arc8.Vertexes[0].Bulge = -Math.Tan(pi / 2 - epsr) * 1.6;
            fun.PolyFill(dxf, Arc8, 0.12, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v9));
            Arc1.Vertexes.Add(new LwPolylineVertex(v11));
            Arc1.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            fun.PolyFill(dxf, Arc1, 0.12, contour);
            Vector2[] Line9 = { v11, v12 };
            fun.drawBLine(dxf, Line9, 0.12, contour);
            Vector2[] Line10 = { v3, v12 };
            fun.drawBLine(dxf, Line10, 0.12, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v12));
            Arc2.Vertexes.Add(new LwPolylineVertex(v13));
            Arc2.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            fun.PolyFill(dxf, Arc2, 0.12, contour);
            Vector2[] Line11 = { v14, v13 };
            fun.drawBLine(dxf, Line11, 0.12, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v14));
            Arc3.Vertexes.Add(new LwPolylineVertex(v15));
            Arc3.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            fun.PolyFill(dxf, Arc3, 0.12, contour);
            Vector2[] Line12 = { v15, v10 };
            fun.drawBLine(dxf, Line12, 0.12, contour);
            //Vector2[] Line13 = { v17, v14 };
            //fun.drawBLine(dxf, Line13, 0.1, skdimensioning);
            //Vector2[] Line14 = { v18, v10 };
            //fun.drawBLine(dxf, Line14, 0.1, skdimensioning);
            //
            //DimensionStyle dimensionStyle = fun.CreateDimStyle();
            //dimensionStyle.ArrowSize = 1;
            //dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.TextHeight = 1.8;
            //double offset = 6;
            //LinearDimension dim1 = new LinearDimension(new Line(v1, v2), offset * 2, 90, dimensionStyle);
            //dim1.UserText = "16 ";
            //dxf.AddEntity(dim1);
            //LinearDimension dim2 = new LinearDimension(new Line(v14, v2), offset * 8, 360, dimensionStyle);
            //dim2.UserText = "100 ";
            //dxf.AddEntity(dim2);
            //LinearDimension dim3 = new LinearDimension(new Line(v15, v3), offset * 2, 270, dimensionStyle);
            //dim3.UserText = "17 ";
            //dxf.AddEntity(dim3);
            //LinearDimension dim4 = new LinearDimension(new Line(v14, v4), offset * 4, 360, dimensionStyle);
            //dim4.UserText = "25 ";
            //dxf.AddEntity(dim4);
            //LinearDimension dim5 = new LinearDimension(new Line(v16, v14), offset * 6, 360, dimensionStyle);
            //dim5.UserText = "30 ";
            //dxf.AddEntity(dim5);
            //Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v14, v17), new Line(v10, v18), offset * 3, dimensionStyle);
            //angdim1.UserText = "75°";
            //dxf.AddEntity(angdim1);
            ////
            ///
            //Vector2[] Line15 = { v19, v20 };
            //fun.drawBLine(dxf, Line15, 0.12, contour);
            //Vector2[] Line16 = { v19, v21 };
            //fun.drawBLine(dxf, Line16, 0.12, contour);
            //Vector2[] Line17 = { v20, v22 };
            //fun.drawBLine(dxf, Line17, 0.12, contour);
            Vector2[] Line18 = { v23, v22 };
            fun.drawBLine(dxf, Line18, 0.12, contour);
            Vector2[] Line19 = { v24, v22 };
            fun.drawBLine(dxf, Line19, 0.12, contour);
            Vector2[] Line20 = { v23, v25 };
            fun.drawBLine(dxf, Line20, 0.12, contour);
            Vector2[] Line21 = { v23, v26 };
            fun.drawBLine(dxf, Line21, 0.12, contour);
            Vector2[] Line22 = { v27, v26 };
            fun.drawBLine(dxf, Line22, 0.12, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v26));
            Arc4.Vertexes.Add(new LwPolylineVertex(v28));
            Arc4.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            fun.PolyFill(dxf, Arc4, 0.12, contour);
            LwPolyline Arc5 = new LwPolyline();
            Arc5.Vertexes.Add(new LwPolylineVertex(v27));
            Arc5.Vertexes.Add(new LwPolylineVertex(v29));
            Arc5.Vertexes[0].Bulge = -Math.Tan(pi / 2 - epsr) * 1.6;
            fun.PolyFill(dxf, Arc5, 0.12, contour);
            Vector2[] Line23 = { v29, v30 };
            fun.drawBLine(dxf, Line23, 0.12, contour);
            Vector2[] Line24 = { v21, v30 };
            fun.drawBLine(dxf, Line24, 0.12, contour);
            LwPolyline Arc6 = new LwPolyline();
            Arc6.Vertexes.Add(new LwPolylineVertex(v31));
            Arc6.Vertexes.Add(new LwPolylineVertex(v30));
            Arc6.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            fun.PolyFill(dxf, Arc6, 0.12, contour);
            Vector2[] Line25 = { v31, v32 };
            fun.drawBLine(dxf, Line25, 0.12, contour);
            LwPolyline Arc7 = new LwPolyline();
            Arc7.Vertexes.Add(new LwPolylineVertex(v32));
            Arc7.Vertexes.Add(new LwPolylineVertex(v33));
            Arc7.Vertexes[0].Bulge = -Math.Tan(pi / 2 - epsr) * 1.6;
            fun.PolyFill(dxf, Arc7, 0.12, contour);
            Vector2[] Line26 = { v28, v33 };
            fun.drawBLine(dxf, Line26, 0.12, contour);

            //
            Vector2[] Line27 = { v37, v4 };
            fun.drawBLine(dxf, Line27, 0.12, contour);
            Vector2[] Line28 = { v3, v38 };
            fun.drawBLine(dxf, Line28, 0.12, contour);
            Vector2[] Line29 = { v22, v39 };
            fun.drawBLine(dxf, Line29, 0.12, contour);
            Vector2[] Line30 = { v21, v40 };
            fun.drawBLine(dxf, Line30, 0.12, contour);
            //Vector2[] Line27 = { v35, v32 };
            //fun.drawBLine(dxf, Line27, 0.1, skdimensioning);
            //Vector2[] Line28 = { v36, v28 };
            //fun.drawBLine(dxf, Line28, 0.1, skdimensioning);
            //LinearDimension dim6 = new LinearDimension(new Line(v19, v20), offset * 2, 90, dimensionStyle);
            //dim6.UserText = "16 ";
            //dxf.AddEntity(dim6);
            //LinearDimension dim7 = new LinearDimension(new Line(v32, v20), offset * 8, 180, dimensionStyle);
            //dim7.UserText = "100 ";
            //dxf.AddEntity(dim7);
            //LinearDimension dim8 = new LinearDimension(new Line(v33, v21), offset * 2, 270, dimensionStyle);
            //dim8.UserText = "17 ";
            //dxf.AddEntity(dim8);
            //LinearDimension dim9 = new LinearDimension(new Line(v32, v22), offset * 4, 180, dimensionStyle);
            //dim9.UserText = "25 ";
            //dxf.AddEntity(dim9);
            //LinearDimension dim10 = new LinearDimension(new Line(v34, v32), offset * 6, 180, dimensionStyle);
            //dim10.UserText = "30 ";
            //dxf.AddEntity(dim10);
            //Angular2LineDimension angdim2 = new Angular2LineDimension(new Line(v32, v35), new Line(v28, v36), offset * 2, dimensionStyle);
            //angdim2.UserText = "75°";
            //dxf.AddEntity(angdim2);
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint24(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 16;
            double pi = Math.PI;
            double epsr = 75 * pi / 180;
            double l = 100;
            double l1 = 30;
            double h1 = 17;
            double l2 = 25;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h);
            Vector2 v3 = new Vector2(v1.X + l - Math.Tan(pi / 2 - epsr) * h1, v1.Y);
            Vector2 v4 = new Vector2(v2.X + l - l2, v2.Y);
            Vector2 v5 = new Vector2(v4.X + (Math.Tan(pi / 2 - epsr) * 8), v1.Y + h1 + (Math.Tan(pi / 2 - epsr) * 16 * Math.Tan(pi / 2 - epsr)));
            //
            Vector2 v6 = new Vector2(v4.X, v4.Y - h);
            Vector2 v7 = new Vector2(v5.X, v1.Y);
            //刀口前
            Vector2 v8 = new Vector2(v4.X + l2 - (Math.Tan(pi / 2 - epsr) * 16) - (Math.Tan(pi / 2 - epsr) * 17), v5.Y);
            //
            Vector2 v9 = new Vector2(v8.X - Math.Tan(pi / 2 - epsr) * 6, v8.Y - Math.Tan(pi / 2 - epsr) * 25);
            Vector2 v10 = new Vector2(v8.X + Math.Tan(pi / 2 - epsr) * 5, v8.Y + (Math.Tan(pi / 2 - epsr) * 3));
            //
            Vector2 v11 = new Vector2(v9.X + Math.Tan(pi / 2 - epsr) * 3, v9.Y - (Math.Tan(pi / 2 - epsr) * 5));
            Vector2 v12 = new Vector2(v11.X + Math.Tan(pi / 2 - epsr) * 25, v11.Y - Math.Tan(pi / 2 - epsr) * 6);
            //
            Vector2 v13 = new Vector2(v12.X + Math.Tan(pi / 2 - epsr) * 5, v12.Y + (Math.Tan(pi / 2 - epsr) * 3));
            Vector2 v14 = new Vector2(v13.X + Math.Tan(pi / 2 - epsr) * 6, v13.Y + Math.Tan(pi / 2 - epsr) * 25);
            //
            Vector2 v15 = new Vector2(v14.X - Math.Tan(pi / 2 - epsr) * 3, v14.Y + (Math.Tan(pi / 2 - epsr) * 5));
            //
            Vector2 v16 = new Vector2(v4.X - h / 5, v4.Y);
            //
            Vector2 v17 = new Vector2(v14.X, v14.Y + h / 2);
            //
            Vector2 v18 = new Vector2(v10.X - Math.Tan(pi / 2 - epsr) * 18, v10.Y + Math.Tan(pi / 2 - epsr) * 5);
            ////下半部分
            ///
            Vector2 v19 = new Vector2(v1.X, v1.Y - l2);
            Vector2 v20 = new Vector2(v19.X, v19.Y - h);
            Vector2 v21 = new Vector2(v19.X + l - Math.Tan(pi / 2 - epsr) * h1, v19.Y);
            Vector2 v22 = new Vector2(v20.X + l - l2, v20.Y);
            Vector2 v23 = new Vector2(v22.X + (Math.Tan(pi / 2 - epsr) * 8), v19.Y - h1 - (Math.Tan(pi / 2 - epsr) * 16 * Math.Tan(pi / 2 - epsr)));
            //
            Vector2 v24 = new Vector2(v22.X, v22.Y + h);
            Vector2 v25 = new Vector2(v23.X, v19.Y);
            //
            Vector2 v26 = new Vector2(v22.X + l2 - (Math.Tan(pi / 2 - epsr) * 16) - (Math.Tan(pi / 2 - epsr) * 17), v23.Y);
            //
            Vector2 v27 = new Vector2(v26.X - Math.Tan(pi / 2 - epsr) * 6, v26.Y + Math.Tan(pi / 2 - epsr) * 25);
            Vector2 v28 = new Vector2(v26.X + Math.Tan(pi / 2 - epsr) * 5, v26.Y - (Math.Tan(pi / 2 - epsr) * 3));
            //
            Vector2 v29 = new Vector2(v27.X + Math.Tan(pi / 2 - epsr) * 3, v27.Y + (Math.Tan(pi / 2 - epsr) * 5));
            Vector2 v30 = new Vector2(v29.X + Math.Tan(pi / 2 - epsr) * 25, v29.Y + Math.Tan(pi / 2 - epsr) * 6);
            //
            Vector2 v31 = new Vector2(v30.X + Math.Tan(pi / 2 - epsr) * 5, v30.Y - (Math.Tan(pi / 2 - epsr) * 3));
            Vector2 v32 = new Vector2(v31.X + Math.Tan(pi / 2 - epsr) * 6, v31.Y - Math.Tan(pi / 2 - epsr) * 25);
            //
            Vector2 v33 = new Vector2(v32.X - Math.Tan(pi / 2 - epsr) * 3, v32.Y - (Math.Tan(pi / 2 - epsr) * 5));
            //
            Vector2 v34 = new Vector2(v22.X - h / 5, v22.Y);
            //
            Vector2 v35 = new Vector2(v32.X, v32.Y - h / 2);
            //
            Vector2 v36 = new Vector2(v28.X - Math.Tan(pi / 2 - epsr) * 18, v28.Y - Math.Tan(pi / 2 - epsr) * 5);
            // 线段
            //主视图
            //Vector2[] Line1 = { v1, v2 };
            //fun.drawBLine(dxf, Line1, 0.12, contour);
            //Vector2[] Line2 = { v1, v3 };
            //fun.drawBLine(dxf, Line2, 0.12, contour);
            //Vector2[] Line3 = { v2, v4 };
            //fun.drawBLine(dxf, Line3, 0.12, contour);
            //Vector2[] Line4 = { v5, v4 };
            //fun.drawBLine(dxf, Line4, 0.12, contour);
            //Vector2[] Line5 = { v6, v4 };
            //fun.drawBLine(dxf, Line5, 0.12, contour);
            //Vector2[] Line6 = { v5, v7 };
            //fun.drawBLine(dxf, Line6, 0.12, contour);
            //Vector2[] Line7 = { v5, v8 };
            //fun.drawBLine(dxf, Line7, 0.12, contour);
            //Vector2[] Line8 = { v9, v8 };
            //fun.drawBLine(dxf, Line8, 0.12, contour);
            //LwPolyline Arc8 = new LwPolyline();
            //Arc8.Vertexes.Add(new LwPolylineVertex(v8));
            //Arc8.Vertexes.Add(new LwPolylineVertex(v10));
            //Arc8.Vertexes[0].Bulge = -Math.Tan(pi / 2 - epsr) * 1.6;
            //fun.PolyFill(dxf, Arc8, 0.12, contour);
            //LwPolyline Arc1 = new LwPolyline();
            //Arc1.Vertexes.Add(new LwPolylineVertex(v9));
            //Arc1.Vertexes.Add(new LwPolylineVertex(v11));
            //Arc1.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            //fun.PolyFill(dxf, Arc1, 0.12, contour);
            //Vector2[] Line9 = { v11, v12 };
            //fun.drawBLine(dxf, Line9, 0.12, contour);
            //Vector2[] Line10 = { v3, v12 };
            //fun.drawBLine(dxf, Line10, 0.12, contour);
            //LwPolyline Arc2 = new LwPolyline();
            //Arc2.Vertexes.Add(new LwPolylineVertex(v12));
            //Arc2.Vertexes.Add(new LwPolylineVertex(v13));
            //Arc2.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            //fun.PolyFill(dxf, Arc2, 0.12, contour);
            //Vector2[] Line11 = { v14, v13 };
            //fun.drawBLine(dxf, Line11, 0.12, contour);
            //LwPolyline Arc3 = new LwPolyline();
            //Arc3.Vertexes.Add(new LwPolylineVertex(v14));
            //Arc3.Vertexes.Add(new LwPolylineVertex(v15));
            //Arc3.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            //fun.PolyFill(dxf, Arc3, 0.12, contour);
            //Vector2[] Line12 = { v15, v10 };
            //fun.drawBLine(dxf, Line12, 0.12, contour);
            //Vector2[] Line13 = { v17, v14 };
            //fun.drawBLine(dxf, Line13, 0.1, skdimensioning);
            //Vector2[] Line14 = { v18, v10 };
            //fun.drawBLine(dxf, Line14, 0.1, skdimensioning);
            //
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 1;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 1.8;
            double offset = 6;
            //LinearDimension dim1 = new LinearDimension(new Line(v1, v2), offset * 2, 90, dimensionStyle);
            //dim1.UserText = "16 ";
            //dxf.AddEntity(dim1);
            //LinearDimension dim2 = new LinearDimension(new Line(v14, v2), offset * 8, 360, dimensionStyle);
            //dim2.UserText = "100 ";
            //dxf.AddEntity(dim2);
            LinearDimension dim3 = new LinearDimension(new Line(v15, v3), offset * 2, 270, dimensionStyle);
            dim3.UserText = "17 ";
            dxf.AddEntity(dim3);
            LinearDimension dim4 = new LinearDimension(new Line(v14, v4), offset * 4, 360, dimensionStyle);
            dim4.UserText = "25 ";
            dxf.AddEntity(dim4);
            LinearDimension dim5 = new LinearDimension(new Line(v16, v14), offset * 6, 360, dimensionStyle);
            dim5.UserText = "30 ";
            dxf.AddEntity(dim5);
            Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v14, v17), new Line(v10, v18), offset * 3, dimensionStyle);
            angdim1.UserText = "75°";
            dxf.AddEntity(angdim1);
            ////
            ///
            //Vector2[] Line15 = { v19, v20 };
            //fun.drawBLine(dxf, Line15, 0.12, contour);
            //Vector2[] Line16 = { v19, v21 };
            //fun.drawBLine(dxf, Line16, 0.12, contour);
            //Vector2[] Line17 = { v20, v22 };
            //fun.drawBLine(dxf, Line17, 0.12, contour);
            //Vector2[] Line18 = { v23, v22 };
            //fun.drawBLine(dxf, Line18, 0.12, contour);
            //Vector2[] Line19 = { v24, v22 };
            //fun.drawBLine(dxf, Line19, 0.12, contour);
            //Vector2[] Line20 = { v23, v25 };
            //fun.drawBLine(dxf, Line20, 0.12, contour);
            //Vector2[] Line21 = { v23, v26 };
            //fun.drawBLine(dxf, Line21, 0.12, contour);
            //Vector2[] Line22 = { v27, v26 };
            //fun.drawBLine(dxf, Line22, 0.12, contour);
            //LwPolyline Arc4 = new LwPolyline();
            //Arc4.Vertexes.Add(new LwPolylineVertex(v26));
            //Arc4.Vertexes.Add(new LwPolylineVertex(v28));
            //Arc4.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            //fun.PolyFill(dxf, Arc4, 0.12, contour);
            //LwPolyline Arc5 = new LwPolyline();
            //Arc5.Vertexes.Add(new LwPolylineVertex(v27));
            //Arc5.Vertexes.Add(new LwPolylineVertex(v29));
            //Arc5.Vertexes[0].Bulge = -Math.Tan(pi / 2 - epsr) * 1.6;
            //fun.PolyFill(dxf, Arc5, 0.12, contour);
            //Vector2[] Line23 = { v29, v30 };
            //fun.drawBLine(dxf, Line23, 0.12, contour);
            //Vector2[] Line24 = { v21, v30 };
            //fun.drawBLine(dxf, Line24, 0.12, contour);
            //LwPolyline Arc6 = new LwPolyline();
            //Arc6.Vertexes.Add(new LwPolylineVertex(v31));
            //Arc6.Vertexes.Add(new LwPolylineVertex(v30));
            //Arc6.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            //fun.PolyFill(dxf, Arc6, 0.12, contour);
            //Vector2[] Line25 = { v31, v32 };
            //fun.drawBLine(dxf, Line25, 0.12, contour);
            //LwPolyline Arc7 = new LwPolyline();
            //Arc7.Vertexes.Add(new LwPolylineVertex(v32));
            //Arc7.Vertexes.Add(new LwPolylineVertex(v33));
            //Arc7.Vertexes[0].Bulge = -Math.Tan(pi / 2 - epsr) * 1.6;
            //fun.PolyFill(dxf, Arc7, 0.12, contour);
            //Vector2[] Line26 = { v28, v33 };
            //fun.drawBLine(dxf, Line26, 0.12, contour);
            //Vector2[] Line27 = { v35, v32 };
            //fun.drawBLine(dxf, Line27, 0.1, skdimensioning);
            //Vector2[] Line28 = { v36, v28 };
            //fun.drawBLine(dxf, Line28, 0.1, skdimensioning);
            //LinearDimension dim6 = new LinearDimension(new Line(v19, v20), offset * 2, 90, dimensionStyle);
            //dim6.UserText = "16 ";
            //dxf.AddEntity(dim6);
            //LinearDimension dim7 = new LinearDimension(new Line(v32, v20), offset * 8, 180, dimensionStyle);
            //dim7.UserText = "100 ";
            //dxf.AddEntity(dim7);
            LinearDimension dim8 = new LinearDimension(new Line(v33, v21), offset * 2, 270, dimensionStyle);
            dim8.UserText = "17 ";
            dxf.AddEntity(dim8);
            LinearDimension dim9 = new LinearDimension(new Line(v32, v22), offset * 5, 180, dimensionStyle);
            dim9.UserText = "25 ";
            dxf.AddEntity(dim9);
            LinearDimension dim10 = new LinearDimension(new Line(v34, v32), offset * 7, 180, dimensionStyle);
            dim10.UserText = "30 ";
            dxf.AddEntity(dim10);
            Angular2LineDimension angdim2 = new Angular2LineDimension(new Line(v32, v35), new Line(v28, v36), offset * 3, dimensionStyle);
            angdim2.UserText = "75°";
            dxf.AddEntity(angdim2);
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint25(Dictionary<string, Object> data)   //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 16;
            double pi = Math.PI;
            double epsr = 75 * pi / 180;
            double l = 100;
            double l1 = 30;
            double h1 = 17;
            double l2 = 25;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h);
            Vector2 v3 = new Vector2(v1.X + l - Math.Tan(pi / 2 - epsr) * h1, v1.Y);
            Vector2 v4 = new Vector2(v2.X + l - l2, v2.Y);
            Vector2 v5 = new Vector2(v4.X + (Math.Tan(pi / 2 - epsr) * 8), v1.Y + h1 + (Math.Tan(pi / 2 - epsr) * 16 * Math.Tan(pi / 2 - epsr)));
            //
            Vector2 v6 = new Vector2(v4.X, v4.Y - h);
            Vector2 v7 = new Vector2(v5.X, v1.Y);
            //刀口前
            Vector2 v8 = new Vector2(v4.X + l2 - (Math.Tan(pi / 2 - epsr) * 16) - (Math.Tan(pi / 2 - epsr) * 17), v5.Y);
            //
            Vector2 v9 = new Vector2(v8.X - Math.Tan(pi / 2 - epsr) * 6, v8.Y - Math.Tan(pi / 2 - epsr) * 25);
            Vector2 v10 = new Vector2(v8.X + Math.Tan(pi / 2 - epsr) * 5, v8.Y + (Math.Tan(pi / 2 - epsr) * 3));
            //
            Vector2 v11 = new Vector2(v9.X + Math.Tan(pi / 2 - epsr) * 3, v9.Y - (Math.Tan(pi / 2 - epsr) * 5));
            Vector2 v12 = new Vector2(v11.X + Math.Tan(pi / 2 - epsr) * 25, v11.Y - Math.Tan(pi / 2 - epsr) * 6);
            //
            Vector2 v13 = new Vector2(v12.X + Math.Tan(pi / 2 - epsr) * 5, v12.Y + (Math.Tan(pi / 2 - epsr) * 3));
            Vector2 v14 = new Vector2(v13.X + Math.Tan(pi / 2 - epsr) * 6, v13.Y + Math.Tan(pi / 2 - epsr) * 25);
            //
            Vector2 v15 = new Vector2(v14.X - Math.Tan(pi / 2 - epsr) * 3, v14.Y + (Math.Tan(pi / 2 - epsr) * 5));
            //
            Vector2 v16 = new Vector2(v4.X - h / 5, v4.Y);
            //
            Vector2 v17 = new Vector2(v14.X, v14.Y + h / 2);
            //
            Vector2 v18 = new Vector2(v10.X - Math.Tan(pi / 2 - epsr) * 18, v10.Y + Math.Tan(pi / 2 - epsr) * 5);
            //
            Vector2 v37 = new Vector2(v4.X - l2 / 5.5, v4.Y);
            Vector2 v38 = new Vector2(v3.X - l2, v3.Y);
            ////下半部分
            ///
            Vector2 v19 = new Vector2(v1.X, v1.Y - l2);
            Vector2 v20 = new Vector2(v19.X, v19.Y - h);
            Vector2 v21 = new Vector2(v19.X + l - Math.Tan(pi / 2 - epsr) * h1, v19.Y);
            Vector2 v22 = new Vector2(v20.X + l - l2, v20.Y);
            Vector2 v23 = new Vector2(v22.X + (Math.Tan(pi / 2 - epsr) * 8), v19.Y - h1 - (Math.Tan(pi / 2 - epsr) * 16 * Math.Tan(pi / 2 - epsr)));
            //
            Vector2 v24 = new Vector2(v22.X, v22.Y + h);
            Vector2 v25 = new Vector2(v23.X, v19.Y);
            //
            Vector2 v26 = new Vector2(v22.X + l2 - (Math.Tan(pi / 2 - epsr) * 16) - (Math.Tan(pi / 2 - epsr) * 17), v23.Y);
            //
            Vector2 v27 = new Vector2(v26.X - Math.Tan(pi / 2 - epsr) * 6, v26.Y + Math.Tan(pi / 2 - epsr) * 25);
            Vector2 v28 = new Vector2(v26.X + Math.Tan(pi / 2 - epsr) * 5, v26.Y - (Math.Tan(pi / 2 - epsr) * 3));
            //
            Vector2 v29 = new Vector2(v27.X + Math.Tan(pi / 2 - epsr) * 3, v27.Y + (Math.Tan(pi / 2 - epsr) * 5));
            Vector2 v30 = new Vector2(v29.X + Math.Tan(pi / 2 - epsr) * 25, v29.Y + Math.Tan(pi / 2 - epsr) * 6);
            //
            Vector2 v31 = new Vector2(v30.X + Math.Tan(pi / 2 - epsr) * 5, v30.Y - (Math.Tan(pi / 2 - epsr) * 3));
            Vector2 v32 = new Vector2(v31.X + Math.Tan(pi / 2 - epsr) * 6, v31.Y - Math.Tan(pi / 2 - epsr) * 25);
            //
            Vector2 v33 = new Vector2(v32.X - Math.Tan(pi / 2 - epsr) * 3, v32.Y - (Math.Tan(pi / 2 - epsr) * 5));
            //
            Vector2 v34 = new Vector2(v22.X - h / 5, v22.Y);
            //
            Vector2 v35 = new Vector2(v32.X, v32.Y - h / 2);
            //
            Vector2 v36 = new Vector2(v28.X - Math.Tan(pi / 2 - epsr) * 18, v28.Y - Math.Tan(pi / 2 - epsr) * 5);
            //
            Vector2 v39 = new Vector2(v22.X - l2 / 5.5, v22.Y);
            Vector2 v40 = new Vector2(v21.X - l2, v21.Y);
            //
            Vector2 v41 = new Vector2(v8.X + l2 / 4, v8.Y - l2 / 10);
            Vector2 v42 = new Vector2(v41.X + h / 16, v41.Y - h / 10);
            //
            Vector2 v43 = new Vector2(v26.X + l2 / 4, v26.Y + l2 / 10);
            Vector2 v44 = new Vector2(v43.X + h / 16, v43.Y + h / 10);
            // 线段
            //主视图
            //Vector2[] Line1 = { v1, v2 };
            //fun.drawBLine(dxf, Line1, 0.12, contour);
            //Vector2[] Line2 = { v1, v3 };
            //fun.drawBLine(dxf, Line2, 0.12, contour);
            //Vector2[] Line3 = { v2, v4 };
            //fun.drawBLine(dxf, Line3, 0.12, contour);
            Vector2[] Line4 = { v5, v4 };
            fun.drawBLine(dxf, Line4, 0.12, contour);
            //Vector2[] Line5 = { v6, v4 };
            //fun.drawBLine(dxf, Line5, 0.12, contour);
            //Vector2[] Line6 = { v5, v7 };
            //fun.drawBLine(dxf, Line6, 0.12, contour);
            Vector2[] Line7 = { v5, v8 };
            fun.drawBLine(dxf, Line7, 0.12, contour);
            //Vector2[] Line8 = { v9, v8 };
            //fun.drawBLine(dxf, Line8, 0.12, contour);
            //LwPolyline Arc8 = new LwPolyline();
            //Arc8.Vertexes.Add(new LwPolylineVertex(v8));
            //Arc8.Vertexes.Add(new LwPolylineVertex(v10));
            //Arc8.Vertexes[0].Bulge = -Math.Tan(pi / 2 - epsr) * 1.6;
            //fun.PolyFill(dxf, Arc8, 0.12, contour);
            //LwPolyline Arc1 = new LwPolyline();
            //Arc1.Vertexes.Add(new LwPolylineVertex(v9));
            //Arc1.Vertexes.Add(new LwPolylineVertex(v11));
            //Arc1.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            //fun.PolyFill(dxf, Arc1, 0.12, contour);
            //Vector2[] Line9 = { v11, v12 };
            //fun.drawBLine(dxf, Line9, 0.12, contour);
            //Vector2[] Line10 = { v3, v12 };
            //fun.drawBLine(dxf, Line10, 0.12, contour);
            //LwPolyline Arc2 = new LwPolyline();
            //Arc2.Vertexes.Add(new LwPolylineVertex(v12));
            //Arc2.Vertexes.Add(new LwPolylineVertex(v13));
            //Arc2.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            //fun.PolyFill(dxf, Arc2, 0.12, contour);
            //Vector2[] Line11 = { v14, v13 };
            //fun.drawBLine(dxf, Line11, 0.12, contour);
            //LwPolyline Arc3 = new LwPolyline();
            //Arc3.Vertexes.Add(new LwPolylineVertex(v14));
            //Arc3.Vertexes.Add(new LwPolylineVertex(v15));
            //Arc3.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            //fun.PolyFill(dxf, Arc3, 0.12, contour);
            //Vector2[] Line12 = { v15, v10 };
            //fun.drawBLine(dxf, Line12, 0.12, contour);
            //Vector2[] Line13 = { v17, v14 };
            //fun.drawBLine(dxf, Line13, 0.1, skdimensioning);
            //Vector2[] Line14 = { v18, v10 };
            //fun.drawBLine(dxf, Line14, 0.1, skdimensioning);
            //
            //DimensionStyle dimensionStyle = fun.CreateDimStyle();
            //dimensionStyle.ArrowSize = 1;
            //dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.TextHeight = 1.8;
            //double offset = 6;
            //LinearDimension dim1 = new LinearDimension(new Line(v1, v2), offset * 2, 90, dimensionStyle);
            //dim1.UserText = "16 ";
            //dxf.AddEntity(dim1);
            //LinearDimension dim2 = new LinearDimension(new Line(v14, v2), offset * 8, 360, dimensionStyle);
            //dim2.UserText = "100 ";
            //dxf.AddEntity(dim2);
            //LinearDimension dim3 = new LinearDimension(new Line(v15, v3), offset * 2, 270, dimensionStyle);
            //dim3.UserText = "17 ";
            //dxf.AddEntity(dim3);
            //LinearDimension dim4 = new LinearDimension(new Line(v14, v4), offset * 4, 360, dimensionStyle);
            //dim4.UserText = "25 ";
            //dxf.AddEntity(dim4);
            //LinearDimension dim5 = new LinearDimension(new Line(v16, v14), offset * 6, 360, dimensionStyle);
            //dim5.UserText = "30 ";
            //dxf.AddEntity(dim5);
            //Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v14, v17), new Line(v10, v18), offset * 3, dimensionStyle);
            //angdim1.UserText = "75°";
            //dxf.AddEntity(angdim1);
            ////
            ///
            //Vector2[] Line15 = { v19, v20 };
            //fun.drawBLine(dxf, Line15, 0.12, contour);
            //Vector2[] Line16 = { v19, v21 };
            //fun.drawBLine(dxf, Line16, 0.12, contour);
            //Vector2[] Line17 = { v20, v22 };
            //fun.drawBLine(dxf, Line17, 0.12, contour);
            Vector2[] Line18 = { v23, v22 };
            fun.drawBLine(dxf, Line18, 0.12, contour);
            //Vector2[] Line19 = { v24, v22 };
            //fun.drawBLine(dxf, Line19, 0.12, contour);
            //Vector2[] Line20 = { v23, v25 };
            //fun.drawBLine(dxf, Line20, 0.12, contour);
            Vector2[] Line21 = { v23, v26 };
            fun.drawBLine(dxf, Line21, 0.12, contour);
            //Vector2[] Line22 = { v27, v26 };
            //fun.drawBLine(dxf, Line22, 0.12, contour);
            //LwPolyline Arc4 = new LwPolyline();
            //Arc4.Vertexes.Add(new LwPolylineVertex(v26));
            //Arc4.Vertexes.Add(new LwPolylineVertex(v28));
            //Arc4.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            //fun.PolyFill(dxf, Arc4, 0.12, contour);
            //LwPolyline Arc5 = new LwPolyline();
            //Arc5.Vertexes.Add(new LwPolylineVertex(v27));
            //Arc5.Vertexes.Add(new LwPolylineVertex(v29));
            //Arc5.Vertexes[0].Bulge = -Math.Tan(pi / 2 - epsr) * 1.6;
            //fun.PolyFill(dxf, Arc5, 0.12, contour);
            //Vector2[] Line23 = { v29, v30 };
            //fun.drawBLine(dxf, Line23, 0.12, contour);
            //Vector2[] Line24 = { v21, v30 };
            //fun.drawBLine(dxf, Line24, 0.12, contour);
            //LwPolyline Arc6 = new LwPolyline();
            //Arc6.Vertexes.Add(new LwPolylineVertex(v31));
            //Arc6.Vertexes.Add(new LwPolylineVertex(v30));
            //Arc6.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            //fun.PolyFill(dxf, Arc6, 0.12, contour);
            //Vector2[] Line25 = { v31, v32 };
            //fun.drawBLine(dxf, Line25, 0.12, contour);
            //LwPolyline Arc7 = new LwPolyline();
            //Arc7.Vertexes.Add(new LwPolylineVertex(v32));
            //Arc7.Vertexes.Add(new LwPolylineVertex(v33));
            //Arc7.Vertexes[0].Bulge = -Math.Tan(pi / 2 - epsr) * 1.6;
            //fun.PolyFill(dxf, Arc7, 0.12, contour);
            //Vector2[] Line26 = { v28, v33 };
            //fun.drawBLine(dxf, Line26, 0.12, contour);

            //
            Vector2[] Line27 = { v37, v4 };
            fun.drawBLine(dxf, Line27, 0.12, contour);
            Vector2[] Line28 = { v3, v38 };
            fun.drawBLine(dxf, Line28, 0.12, contour);
            //
            Vector2[] Line29 = { v22, v39 };
            fun.drawBLine(dxf, Line29, 0.12, contour);
            Vector2[] Line30 = { v21, v40 };
            fun.drawBLine(dxf, Line30, 0.12, contour);
            //
            Vector2[] Line31 = { v38, v37 };
            fun.drawBLine(dxf, Line31, 0.12, contour);
            //
            Vector2[] Line32 = { v8, v41 };
            fun.drawBLine(dxf, Line32, 0.12, contour);
            //
            Vector2[] Line33 = { v42, v41 };
            fun.drawBLine(dxf, Line33, 0.12, contour);
            Vector2[] Line34 = { v42, v3 };
            fun.drawBLine(dxf, Line34, 0.12, contour);
            //
            Vector2[] Line35 = { v26, v43 };
            fun.drawBLine(dxf, Line35, 0.12, contour);
            Vector2[] Line36 = { v44, v43 };
            fun.drawBLine(dxf, Line36, 0.12, contour);
            Vector2[] Line37 = { v21, v44 };
            fun.drawBLine(dxf, Line37, 0.12, contour);
            Vector2[] Line38 = { v39, v40 };
            fun.drawBLine(dxf, Line38, 0.12, contour);
            //Vector2[] Line27 = { v35, v32 };
            //fun.drawBLine(dxf, Line27, 0.1, skdimensioning);
            //Vector2[] Line28 = { v36, v28 };
            //fun.drawBLine(dxf, Line28, 0.1, skdimensioning);
            //LinearDimension dim6 = new LinearDimension(new Line(v19, v20), offset * 2, 90, dimensionStyle);
            //dim6.UserText = "16 ";
            //dxf.AddEntity(dim6);
            //LinearDimension dim7 = new LinearDimension(new Line(v32, v20), offset * 8, 180, dimensionStyle);
            //dim7.UserText = "100 ";
            //dxf.AddEntity(dim7);
            //LinearDimension dim8 = new LinearDimension(new Line(v33, v21), offset * 2, 270, dimensionStyle);
            //dim8.UserText = "17 ";
            //dxf.AddEntity(dim8);
            //LinearDimension dim9 = new LinearDimension(new Line(v32, v22), offset * 4, 180, dimensionStyle);
            //dim9.UserText = "25 ";
            //dxf.AddEntity(dim9);
            //LinearDimension dim10 = new LinearDimension(new Line(v34, v32), offset * 6, 180, dimensionStyle);
            //dim10.UserText = "30 ";
            //dxf.AddEntity(dim10);
            //Angular2LineDimension angdim2 = new Angular2LineDimension(new Line(v32, v35), new Line(v28, v36), offset * 2, dimensionStyle);
            //angdim2.UserText = "75°";
            //dxf.AddEntity(angdim2);
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint26(Dictionary<string, Object> data)   //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 16;
            double pi = Math.PI;
            double epsr = 75 * pi / 180;
            double l = 100;
            double l1 = 30;
            double h1 = 17;
            double l2 = 25;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h);
            Vector2 v3 = new Vector2(v1.X + l - Math.Tan(pi / 2 - epsr) * h1, v1.Y);
            Vector2 v4 = new Vector2(v2.X + l - l2, v2.Y);
            Vector2 v5 = new Vector2(v4.X + (Math.Tan(pi / 2 - epsr) * 8), v1.Y + h1 + (Math.Tan(pi / 2 - epsr) * 16 * Math.Tan(pi / 2 - epsr)));
            //
            Vector2 v6 = new Vector2(v4.X, v4.Y - h);
            Vector2 v7 = new Vector2(v5.X, v1.Y);
            //刀口前
            Vector2 v8 = new Vector2(v4.X + l2 - (Math.Tan(pi / 2 - epsr) * 16) - (Math.Tan(pi / 2 - epsr) * 17), v5.Y);
            //
            Vector2 v9 = new Vector2(v8.X - Math.Tan(pi / 2 - epsr) * 6, v8.Y - Math.Tan(pi / 2 - epsr) * 25);
            Vector2 v10 = new Vector2(v8.X + Math.Tan(pi / 2 - epsr) * 5, v8.Y + (Math.Tan(pi / 2 - epsr) * 3));
            //
            Vector2 v11 = new Vector2(v9.X + Math.Tan(pi / 2 - epsr) * 3, v9.Y - (Math.Tan(pi / 2 - epsr) * 5));
            Vector2 v12 = new Vector2(v11.X + Math.Tan(pi / 2 - epsr) * 25, v11.Y - Math.Tan(pi / 2 - epsr) * 6);
            //
            Vector2 v13 = new Vector2(v12.X + Math.Tan(pi / 2 - epsr) * 5, v12.Y + (Math.Tan(pi / 2 - epsr) * 3));
            Vector2 v14 = new Vector2(v13.X + Math.Tan(pi / 2 - epsr) * 6, v13.Y + Math.Tan(pi / 2 - epsr) * 25);
            //
            Vector2 v15 = new Vector2(v14.X - Math.Tan(pi / 2 - epsr) * 3, v14.Y + (Math.Tan(pi / 2 - epsr) * 5));
            //
            Vector2 v16 = new Vector2(v4.X - h / 5, v4.Y);
            //
            Vector2 v17 = new Vector2(v14.X, v14.Y + h / 2);
            //
            Vector2 v18 = new Vector2(v10.X - Math.Tan(pi / 2 - epsr) * 18, v10.Y + Math.Tan(pi / 2 - epsr) * 5);
            ////下半部分
            ///
            Vector2 v19 = new Vector2(v1.X, v1.Y - l2);
            Vector2 v20 = new Vector2(v19.X, v19.Y - h);
            Vector2 v21 = new Vector2(v19.X + l - Math.Tan(pi / 2 - epsr) * h1, v19.Y);
            Vector2 v22 = new Vector2(v20.X + l - l2, v20.Y);
            Vector2 v23 = new Vector2(v22.X + (Math.Tan(pi / 2 - epsr) * 8), v19.Y - h1 - (Math.Tan(pi / 2 - epsr) * 16 * Math.Tan(pi / 2 - epsr)));
            //
            Vector2 v24 = new Vector2(v22.X, v22.Y + h);
            Vector2 v25 = new Vector2(v23.X, v19.Y);
            //
            Vector2 v26 = new Vector2(v22.X + l2 - (Math.Tan(pi / 2 - epsr) * 16) - (Math.Tan(pi / 2 - epsr) * 17), v23.Y);
            //
            Vector2 v27 = new Vector2(v26.X - Math.Tan(pi / 2 - epsr) * 6, v26.Y + Math.Tan(pi / 2 - epsr) * 25);
            Vector2 v28 = new Vector2(v26.X + Math.Tan(pi / 2 - epsr) * 5, v26.Y - (Math.Tan(pi / 2 - epsr) * 3));
            //
            Vector2 v29 = new Vector2(v27.X + Math.Tan(pi / 2 - epsr) * 3, v27.Y + (Math.Tan(pi / 2 - epsr) * 5));
            Vector2 v30 = new Vector2(v29.X + Math.Tan(pi / 2 - epsr) * 25, v29.Y + Math.Tan(pi / 2 - epsr) * 6);
            //
            Vector2 v31 = new Vector2(v30.X + Math.Tan(pi / 2 - epsr) * 5, v30.Y - (Math.Tan(pi / 2 - epsr) * 3));
            Vector2 v32 = new Vector2(v31.X + Math.Tan(pi / 2 - epsr) * 6, v31.Y - Math.Tan(pi / 2 - epsr) * 25);
            //
            Vector2 v33 = new Vector2(v32.X - Math.Tan(pi / 2 - epsr) * 3, v32.Y - (Math.Tan(pi / 2 - epsr) * 5));
            //
            Vector2 v34 = new Vector2(v22.X - h / 5, v22.Y);
            //
            Vector2 v35 = new Vector2(v32.X, v32.Y - h / 2);
            //
            Vector2 v36 = new Vector2(v28.X - Math.Tan(pi / 2 - epsr) * 18, v28.Y - Math.Tan(pi / 2 - epsr) * 5);
            // 线段
            //主视图
            //Vector2[] Line1 = { v1, v2 };
            //fun.drawBLine(dxf, Line1, 0.12, contour);
            //Vector2[] Line2 = { v1, v3 };
            //fun.drawBLine(dxf, Line2, 0.12, contour);
            //Vector2[] Line3 = { v2, v4 };
            //fun.drawBLine(dxf, Line3, 0.12, contour);
            //Vector2[] Line4 = { v5, v4 };
            //fun.drawBLine(dxf, Line4, 0.12, contour);
            //Vector2[] Line5 = { v6, v4 };
            //fun.drawBLine(dxf, Line5, 0.12, contour);
            //Vector2[] Line6 = { v5, v7 };
            //fun.drawBLine(dxf, Line6, 0.12, contour);
            //Vector2[] Line7 = { v5, v8 };
            //fun.drawBLine(dxf, Line7, 0.12, contour);
            Vector2[] Line8 = { v9, v8 };
            fun.drawBLine(dxf, Line8, 0.12, contour);
            LwPolyline Arc8 = new LwPolyline();
            Arc8.Vertexes.Add(new LwPolylineVertex(v8));
            Arc8.Vertexes.Add(new LwPolylineVertex(v10));
            Arc8.Vertexes[0].Bulge = -Math.Tan(pi / 2 - epsr) * 1.6;
            fun.PolyFill(dxf, Arc8, 0.12, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v9));
            Arc1.Vertexes.Add(new LwPolylineVertex(v11));
            Arc1.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            fun.PolyFill(dxf, Arc1, 0.12, contour);
            Vector2[] Line9 = { v11, v12 };
            fun.drawBLine(dxf, Line9, 0.12, contour);
            //Vector2[] Line10 = { v3, v12 };
            //fun.drawBLine(dxf, Line10, 0.12, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v12));
            Arc2.Vertexes.Add(new LwPolylineVertex(v13));
            Arc2.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            fun.PolyFill(dxf, Arc2, 0.12, contour);
            Vector2[] Line11 = { v14, v13 };
            fun.drawBLine(dxf, Line11, 0.12, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v14));
            Arc3.Vertexes.Add(new LwPolylineVertex(v15));
            Arc3.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            fun.PolyFill(dxf, Arc3, 0.12, contour);
            Vector2[] Line12 = { v15, v10 };
            fun.drawBLine(dxf, Line12, 0.12, contour);
            //Vector2[] Line13 = { v17, v14 };
            //fun.drawBLine(dxf, Line13, 0.1, skdimensioning);
            //Vector2[] Line14 = { v18, v10 };
            //fun.drawBLine(dxf, Line14, 0.1, skdimensioning);
            ////
            //DimensionStyle dimensionStyle = fun.CreateDimStyle();
            //dimensionStyle.ArrowSize = 1;
            //dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.TextHeight = 1.8;
            //double offset = 6;
            //LinearDimension dim1 = new LinearDimension(new Line(v1, v2), offset * 2, 90, dimensionStyle);
            //dim1.UserText = "16 ";
            //dxf.AddEntity(dim1);
            //LinearDimension dim2 = new LinearDimension(new Line(v14, v2), offset * 8, 360, dimensionStyle);
            //dim2.UserText = "100 ";
            //dxf.AddEntity(dim2);
            //LinearDimension dim3 = new LinearDimension(new Line(v15, v3), offset * 2, 270, dimensionStyle);
            //dim3.UserText = "17 ";
            //dxf.AddEntity(dim3);
            //LinearDimension dim4 = new LinearDimension(new Line(v14, v4), offset * 4, 360, dimensionStyle);
            //dim4.UserText = "25 ";
            //dxf.AddEntity(dim4);
            //LinearDimension dim5 = new LinearDimension(new Line(v16, v14), offset * 6, 360, dimensionStyle);
            //dim5.UserText = "30 ";
            //dxf.AddEntity(dim5);
            //Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v14, v17), new Line(v10, v18), offset * 3, dimensionStyle);
            //angdim1.UserText = "75°";
            //dxf.AddEntity(angdim1);
            ////
            ///
            //Vector2[] Line15 = { v19, v20 };
            //fun.drawBLine(dxf, Line15, 0.12, contour);
            //Vector2[] Line16 = { v19, v21 };
            //fun.drawBLine(dxf, Line16, 0.12, contour);
            //Vector2[] Line17 = { v20, v22 };
            //fun.drawBLine(dxf, Line17, 0.12, contour);
            //Vector2[] Line18 = { v23, v22 };
            //fun.drawBLine(dxf, Line18, 0.12, contour);
            //Vector2[] Line19 = { v24, v22 };
            //fun.drawBLine(dxf, Line19, 0.12, contour);
            //Vector2[] Line20 = { v23, v25 };
            //fun.drawBLine(dxf, Line20, 0.12, contour);
            //Vector2[] Line21 = { v23, v26 };
            //fun.drawBLine(dxf, Line21, 0.12, contour);
            Vector2[] Line22 = { v27, v26 };
            fun.drawBLine(dxf, Line22, 0.12, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v26));
            Arc4.Vertexes.Add(new LwPolylineVertex(v28));
            Arc4.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            fun.PolyFill(dxf, Arc4, 0.12, contour);
            LwPolyline Arc5 = new LwPolyline();
            Arc5.Vertexes.Add(new LwPolylineVertex(v27));
            Arc5.Vertexes.Add(new LwPolylineVertex(v29));
            Arc5.Vertexes[0].Bulge = -Math.Tan(pi / 2 - epsr) * 1.6;
            fun.PolyFill(dxf, Arc5, 0.12, contour);
            Vector2[] Line23 = { v29, v30 };
            fun.drawBLine(dxf, Line23, 0.12, contour);
            //Vector2[] Line24 = { v21, v30 };
            //fun.drawBLine(dxf, Line24, 0.12, contour);
            LwPolyline Arc6 = new LwPolyline();
            Arc6.Vertexes.Add(new LwPolylineVertex(v31));
            Arc6.Vertexes.Add(new LwPolylineVertex(v30));
            Arc6.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            fun.PolyFill(dxf, Arc6, 0.12, contour);
            Vector2[] Line25 = { v31, v32 };
            fun.drawBLine(dxf, Line25, 0.12, contour);
            LwPolyline Arc7 = new LwPolyline();
            Arc7.Vertexes.Add(new LwPolylineVertex(v32));
            Arc7.Vertexes.Add(new LwPolylineVertex(v33));
            Arc7.Vertexes[0].Bulge = -Math.Tan(pi / 2 - epsr) * 1.6;
            fun.PolyFill(dxf, Arc7, 0.12, contour);
            Vector2[] Line26 = { v28, v33 };
            fun.drawBLine(dxf, Line26, 0.12, contour);
            //Vector2[] Line27 = { v35, v32 };
            //fun.drawBLine(dxf, Line27, 0.1, skdimensioning);
            //Vector2[] Line28 = { v36, v28 };
            //fun.drawBLine(dxf, Line28, 0.1, skdimensioning);
            //LinearDimension dim6 = new LinearDimension(new Line(v19, v20), offset * 2, 90, dimensionStyle);
            //dim6.UserText = "16 ";
            //dxf.AddEntity(dim6);
            //LinearDimension dim7 = new LinearDimension(new Line(v32, v20), offset * 8, 180, dimensionStyle);
            //dim7.UserText = "100 ";
            //dxf.AddEntity(dim7);
            //LinearDimension dim8 = new LinearDimension(new Line(v33, v21), offset * 2, 270, dimensionStyle);
            //dim8.UserText = "17 ";
            //dxf.AddEntity(dim8);
            //LinearDimension dim9 = new LinearDimension(new Line(v32, v22), offset * 4, 180, dimensionStyle);
            //dim9.UserText = "25 ";
            //dxf.AddEntity(dim9);
            //LinearDimension dim10 = new LinearDimension(new Line(v34, v32), offset * 6, 180, dimensionStyle);
            //dim10.UserText = "30 ";
            //dxf.AddEntity(dim10);
            //Angular2LineDimension angdim2 = new Angular2LineDimension(new Line(v32, v35), new Line(v28, v36), offset * 2, dimensionStyle);
            //angdim2.UserText = "75°";
            //dxf.AddEntity(angdim2);
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint27(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 16;
            double pi = Math.PI;
            double epsr = 75 * pi / 180;
            double l = 100;
            double l1 = 30;
            double h1 = 17;
            double l2 = 25;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h);
            Vector2 v3 = new Vector2(v1.X + l - Math.Tan(pi / 2 - epsr) * h1, v1.Y);
            Vector2 v4 = new Vector2(v2.X + l - Math.Tan(pi / 2 - epsr) * h1, v2.Y);
            Vector2 v5 = new Vector2(v4.X + (Math.Tan(pi / 2 - epsr) * 8), v1.Y + h1 + (Math.Tan(pi / 2 - epsr) * 16 * Math.Tan(pi / 2 - epsr)));
            //
            Vector2 v6 = new Vector2(v4.X, v4.Y - h);
            Vector2 v7 = new Vector2(v5.X, v1.Y);
            //刀口前
            Vector2 v8 = new Vector2(v4.X + l2 - (Math.Tan(pi / 2 - epsr) * 16) - (Math.Tan(pi / 2 - epsr) * 17), v5.Y);
            //
            Vector2 v9 = new Vector2(v8.X - Math.Tan(pi / 2 - epsr) * 6, v8.Y - Math.Tan(pi / 2 - epsr) * 25);
            Vector2 v10 = new Vector2(v8.X + Math.Tan(pi / 2 - epsr) * 5, v8.Y + (Math.Tan(pi / 2 - epsr) * 3));
            //
            Vector2 v11 = new Vector2(v9.X + Math.Tan(pi / 2 - epsr) * 3, v9.Y - (Math.Tan(pi / 2 - epsr) * 5));
            Vector2 v12 = new Vector2(v11.X + Math.Tan(pi / 2 - epsr) * 25, v11.Y - Math.Tan(pi / 2 - epsr) * 6);
            //
            Vector2 v13 = new Vector2(v12.X + Math.Tan(pi / 2 - epsr) * 5, v12.Y + (Math.Tan(pi / 2 - epsr) * 3));
            Vector2 v14 = new Vector2(v13.X + Math.Tan(pi / 2 - epsr) * 6, v13.Y + Math.Tan(pi / 2 - epsr) * 25);
            //
            Vector2 v15 = new Vector2(v14.X - Math.Tan(pi / 2 - epsr) * 3, v14.Y + (Math.Tan(pi / 2 - epsr) * 5));
            //
            Vector2 v16 = new Vector2(v4.X - h / 5, v4.Y);
            //
            Vector2 v17 = new Vector2(v14.X, v14.Y + h / 2);
            //
            Vector2 v18 = new Vector2(v10.X - Math.Tan(pi / 2 - epsr) * 18, v10.Y + Math.Tan(pi / 2 - epsr) * 5);
            ////下半部分
            ///
            Vector2 v19 = new Vector2(v1.X, v1.Y - l2);
            Vector2 v20 = new Vector2(v19.X, v19.Y - h);
            Vector2 v21 = new Vector2(v19.X + l - Math.Tan(pi / 2 - epsr) * h1, v19.Y);
            Vector2 v22 = new Vector2(v20.X + l - Math.Tan(pi / 2 - epsr) * h1, v20.Y);
            Vector2 v23 = new Vector2(v22.X + (Math.Tan(pi / 2 - epsr) * 8), v19.Y - h1 - (Math.Tan(pi / 2 - epsr) * 16 * Math.Tan(pi / 2 - epsr)));
            //
            Vector2 v24 = new Vector2(v22.X, v22.Y + h);
            Vector2 v25 = new Vector2(v23.X, v19.Y);
            //
            Vector2 v26 = new Vector2(v22.X + l2 - (Math.Tan(pi / 2 - epsr) * 16) - (Math.Tan(pi / 2 - epsr) * 17), v23.Y);
            //
            Vector2 v27 = new Vector2(v26.X - Math.Tan(pi / 2 - epsr) * 6, v26.Y + Math.Tan(pi / 2 - epsr) * 25);
            Vector2 v28 = new Vector2(v26.X + Math.Tan(pi / 2 - epsr) * 5, v26.Y - (Math.Tan(pi / 2 - epsr) * 3));
            //
            Vector2 v29 = new Vector2(v27.X + Math.Tan(pi / 2 - epsr) * 3, v27.Y + (Math.Tan(pi / 2 - epsr) * 5));
            Vector2 v30 = new Vector2(v29.X + Math.Tan(pi / 2 - epsr) * 25, v29.Y + Math.Tan(pi / 2 - epsr) * 6);
            //
            Vector2 v31 = new Vector2(v30.X + Math.Tan(pi / 2 - epsr) * 5, v30.Y - (Math.Tan(pi / 2 - epsr) * 3));
            Vector2 v32 = new Vector2(v31.X + Math.Tan(pi / 2 - epsr) * 6, v31.Y - Math.Tan(pi / 2 - epsr) * 25);
            //
            Vector2 v33 = new Vector2(v32.X - Math.Tan(pi / 2 - epsr) * 3, v32.Y - (Math.Tan(pi / 2 - epsr) * 5));
            //
            Vector2 v34 = new Vector2(v22.X - h / 5, v22.Y);
            //
            Vector2 v35 = new Vector2(v32.X, v32.Y - h / 2);
            //
            Vector2 v36 = new Vector2(v28.X - Math.Tan(pi / 2 - epsr) * 18, v28.Y - Math.Tan(pi / 2 - epsr) * 5);
            // 线段
            //主视图
            Vector2[] Line1 = { v1, v2 };
            fun.drawBLine(dxf, Line1, 0.12, contour);
            Vector2[] Line2 = { v1, v3 };
            fun.drawBLine(dxf, Line2, 0.12, contour);
            Vector2[] Line3 = { v2, v4 };
            fun.drawBLine(dxf, Line3, 0.12, contour);
            //Vector2[] Line4 = { v5, v4 };
            //fun.drawBLine(dxf, Line4, 0.12, contour);
            //Vector2[] Line5 = { v6, v4 };
            //fun.drawBLine(dxf, Line5, 0.12, contour);
            //Vector2[] Line6 = { v5, v7 };
            //fun.drawBLine(dxf, Line6, 0.12, contour);
            //Vector2[] Line7 = { v5, v8 };
            //fun.drawBLine(dxf, Line7, 0.12, contour);
            //Vector2[] Line8 = { v9, v8 };
            //fun.drawBLine(dxf, Line8, 0.12, contour);
            //LwPolyline Arc8 = new LwPolyline();
            //Arc8.Vertexes.Add(new LwPolylineVertex(v8));
            //Arc8.Vertexes.Add(new LwPolylineVertex(v10));
            //Arc8.Vertexes[0].Bulge = -Math.Tan(pi / 2 - epsr) * 1.6;
            //fun.PolyFill(dxf, Arc8, 0.12, contour);
            //LwPolyline Arc1 = new LwPolyline();
            //Arc1.Vertexes.Add(new LwPolylineVertex(v9));
            //Arc1.Vertexes.Add(new LwPolylineVertex(v11));
            //Arc1.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            //fun.PolyFill(dxf, Arc1, 0.12, contour);
            //Vector2[] Line9 = { v11, v12 };
            //fun.drawBLine(dxf, Line9, 0.12, contour);
            //Vector2[] Line10 = { v3, v12 };
            //fun.drawBLine(dxf, Line10, 0.12, contour);
            //LwPolyline Arc2 = new LwPolyline();
            //Arc2.Vertexes.Add(new LwPolylineVertex(v12));
            //Arc2.Vertexes.Add(new LwPolylineVertex(v13));
            //Arc2.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            //fun.PolyFill(dxf, Arc2, 0.12, contour);
            //Vector2[] Line11 = { v14, v13 };
            //fun.drawBLine(dxf, Line11, 0.12, contour);
            //LwPolyline Arc3 = new LwPolyline();
            //Arc3.Vertexes.Add(new LwPolylineVertex(v14));
            //Arc3.Vertexes.Add(new LwPolylineVertex(v15));
            //Arc3.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            //fun.PolyFill(dxf, Arc3, 0.12, contour);
            //Vector2[] Line12 = { v15, v10 };
            //fun.drawBLine(dxf, Line12, 0.12, contour);
            //Vector2[] Line13 = { v17, v14 };
            //fun.drawBLine(dxf, Line13, 0.1, skdimensioning);
            //Vector2[] Line14 = { v18, v10 };
            //fun.drawBLine(dxf, Line14, 0.1, skdimensioning);
            ////
            //DimensionStyle dimensionStyle = fun.CreateDimStyle();
            //dimensionStyle.ArrowSize = 1;
            //dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.TextHeight = 1.8;
            //double offset = 6;
            //LinearDimension dim1 = new LinearDimension(new Line(v1, v2), offset * 2, 90, dimensionStyle);
            //dim1.UserText = "16 ";
            //dxf.AddEntity(dim1);
            //LinearDimension dim2 = new LinearDimension(new Line(v14, v2), offset * 8, 360, dimensionStyle);
            //dim2.UserText = "100 ";
            //dxf.AddEntity(dim2);
            //LinearDimension dim3 = new LinearDimension(new Line(v15, v3), offset * 2, 270, dimensionStyle);
            //dim3.UserText = "17 ";
            //dxf.AddEntity(dim3);
            //LinearDimension dim4 = new LinearDimension(new Line(v14, v4), offset * 4, 360, dimensionStyle);
            //dim4.UserText = "25 ";
            //dxf.AddEntity(dim4);
            //LinearDimension dim5 = new LinearDimension(new Line(v16, v14), offset * 6, 360, dimensionStyle);
            //dim5.UserText = "30 ";
            //dxf.AddEntity(dim5);
            //Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v14, v17), new Line(v10, v18), offset * 3, dimensionStyle);
            //angdim1.UserText = "75°";
            //dxf.AddEntity(angdim1);
            ////
            ///
            Vector2[] Line15 = { v19, v20 };
            fun.drawBLine(dxf, Line15, 0.12, contour);
            Vector2[] Line16 = { v19, v21 };
            fun.drawBLine(dxf, Line16, 0.12, contour);
            Vector2[] Line17 = { v20, v22 };
            fun.drawBLine(dxf, Line17, 0.12, contour);
            //Vector2[] Line18 = { v23, v22 };
            //fun.drawBLine(dxf, Line18, 0.12, contour);
            //Vector2[] Line19 = { v24, v22 };
            //fun.drawBLine(dxf, Line19, 0.12, contour);
            //Vector2[] Line20 = { v23, v25 };
            //fun.drawBLine(dxf, Line20, 0.12, contour);
            //Vector2[] Line21 = { v23, v26 };
            //fun.drawBLine(dxf, Line21, 0.12, contour);
            //Vector2[] Line22 = { v27, v26 };
            //fun.drawBLine(dxf, Line22, 0.12, contour);
            //LwPolyline Arc4 = new LwPolyline();
            //Arc4.Vertexes.Add(new LwPolylineVertex(v26));
            //Arc4.Vertexes.Add(new LwPolylineVertex(v28));
            //Arc4.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            //fun.PolyFill(dxf, Arc4, 0.12, contour);
            //LwPolyline Arc5 = new LwPolyline();
            //Arc5.Vertexes.Add(new LwPolylineVertex(v27));
            //Arc5.Vertexes.Add(new LwPolylineVertex(v29));
            //Arc5.Vertexes[0].Bulge = -Math.Tan(pi / 2 - epsr) * 1.6;
            //fun.PolyFill(dxf, Arc5, 0.12, contour);
            //Vector2[] Line23 = { v29, v30 };
            //fun.drawBLine(dxf, Line23, 0.12, contour);
            //Vector2[] Line24 = { v21, v30 };
            //fun.drawBLine(dxf, Line24, 0.12, contour);
            //LwPolyline Arc6 = new LwPolyline();
            //Arc6.Vertexes.Add(new LwPolylineVertex(v31));
            //Arc6.Vertexes.Add(new LwPolylineVertex(v30));
            //Arc6.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            //fun.PolyFill(dxf, Arc6, 0.12, contour);
            //Vector2[] Line25 = { v31, v32 };
            //fun.drawBLine(dxf, Line25, 0.12, contour);
            //LwPolyline Arc7 = new LwPolyline();
            //Arc7.Vertexes.Add(new LwPolylineVertex(v32));
            //Arc7.Vertexes.Add(new LwPolylineVertex(v33));
            //Arc7.Vertexes[0].Bulge = -Math.Tan(pi / 2 - epsr) * 1.6;
            //fun.PolyFill(dxf, Arc7, 0.12, contour);
            //Vector2[] Line26 = { v28, v33 };
            //fun.drawBLine(dxf, Line26, 0.12, contour);
            //Vector2[] Line27 = { v35, v32 };
            //fun.drawBLine(dxf, Line27, 0.1, skdimensioning);
            //Vector2[] Line28 = { v36, v28 };
            //fun.drawBLine(dxf, Line28, 0.1, skdimensioning);
            //LinearDimension dim6 = new LinearDimension(new Line(v19, v20), offset * 2, 90, dimensionStyle);
            //dim6.UserText = "16 ";
            //dxf.AddEntity(dim6);
            //LinearDimension dim7 = new LinearDimension(new Line(v32, v20), offset * 8, 180, dimensionStyle);
            //dim7.UserText = "100 ";
            //dxf.AddEntity(dim7);
            //LinearDimension dim8 = new LinearDimension(new Line(v33, v21), offset * 2, 270, dimensionStyle);
            //dim8.UserText = "17 ";
            //dxf.AddEntity(dim8);
            //LinearDimension dim9 = new LinearDimension(new Line(v32, v22), offset * 4, 180, dimensionStyle);
            //dim9.UserText = "25 ";
            //dxf.AddEntity(dim9);
            //LinearDimension dim10 = new LinearDimension(new Line(v34, v32), offset * 6, 180, dimensionStyle);
            //dim10.UserText = "30 ";
            //dxf.AddEntity(dim10);
            //Angular2LineDimension angdim2 = new Angular2LineDimension(new Line(v32, v35), new Line(v28, v36), offset * 2, dimensionStyle);
            //angdim2.UserText = "75°";
            //dxf.AddEntity(angdim2);
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint28(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 16;
            double pi = Math.PI;
            double epsr = 75 * pi / 180;
            double l = 100;
            double l1 = 30;
            double h1 = 17;
            double l2 = 25;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h);
            Vector2 v3 = new Vector2(v1.X + l - Math.Tan(pi / 2 - epsr) * h1, v1.Y);
            Vector2 v4 = new Vector2(v2.X + l - l2, v2.Y);
            Vector2 v5 = new Vector2(v4.X + (Math.Tan(pi / 2 - epsr) * 8), v1.Y + h1 + (Math.Tan(pi / 2 - epsr) * 16 * Math.Tan(pi / 2 - epsr)));
            //
            Vector2 v6 = new Vector2(v4.X, v4.Y - h);
            Vector2 v7 = new Vector2(v5.X, v1.Y);
            //刀口前
            Vector2 v8 = new Vector2(v4.X + l2 - (Math.Tan(pi / 2 - epsr) * 16) - (Math.Tan(pi / 2 - epsr) * 17), v5.Y);
            //
            Vector2 v9 = new Vector2(v8.X - Math.Tan(pi / 2 - epsr) * 6, v8.Y - Math.Tan(pi / 2 - epsr) * 25);
            Vector2 v10 = new Vector2(v8.X + Math.Tan(pi / 2 - epsr) * 5, v8.Y + (Math.Tan(pi / 2 - epsr) * 3));
            //
            Vector2 v11 = new Vector2(v9.X + Math.Tan(pi / 2 - epsr) * 3, v9.Y - (Math.Tan(pi / 2 - epsr) * 5));
            Vector2 v12 = new Vector2(v11.X + Math.Tan(pi / 2 - epsr) * 25, v11.Y - Math.Tan(pi / 2 - epsr) * 6);
            //
            Vector2 v13 = new Vector2(v12.X + Math.Tan(pi / 2 - epsr) * 5, v12.Y + (Math.Tan(pi / 2 - epsr) * 3));
            Vector2 v14 = new Vector2(v13.X + Math.Tan(pi / 2 - epsr) * 6, v13.Y + Math.Tan(pi / 2 - epsr) * 25);
            //
            Vector2 v15 = new Vector2(v14.X - Math.Tan(pi / 2 - epsr) * 3, v14.Y + (Math.Tan(pi / 2 - epsr) * 5));
            //
            Vector2 v16 = new Vector2(v4.X - h / 5, v4.Y);
            //
            Vector2 v17 = new Vector2(v14.X, v14.Y + h / 2);
            //
            Vector2 v18 = new Vector2(v10.X - Math.Tan(pi / 2 - epsr) * 18, v10.Y + Math.Tan(pi / 2 - epsr) * 5);
            ////下半部分
            ///
            Vector2 v19 = new Vector2(v1.X, v1.Y - l2);
            Vector2 v20 = new Vector2(v19.X, v19.Y - h);
            Vector2 v21 = new Vector2(v19.X + l - Math.Tan(pi / 2 - epsr) * h1, v19.Y);
            Vector2 v22 = new Vector2(v20.X + l - l2, v20.Y);
            Vector2 v23 = new Vector2(v22.X + (Math.Tan(pi / 2 - epsr) * 8), v19.Y - h1 - (Math.Tan(pi / 2 - epsr) * 16 * Math.Tan(pi / 2 - epsr)));
            //
            Vector2 v24 = new Vector2(v22.X, v22.Y + h);
            Vector2 v25 = new Vector2(v23.X, v19.Y);
            //
            Vector2 v26 = new Vector2(v22.X + l2 - (Math.Tan(pi / 2 - epsr) * 16) - (Math.Tan(pi / 2 - epsr) * 17), v23.Y);
            //
            Vector2 v27 = new Vector2(v26.X - Math.Tan(pi / 2 - epsr) * 6, v26.Y + Math.Tan(pi / 2 - epsr) * 25);
            Vector2 v28 = new Vector2(v26.X + Math.Tan(pi / 2 - epsr) * 5, v26.Y - (Math.Tan(pi / 2 - epsr) * 3));
            //
            Vector2 v29 = new Vector2(v27.X + Math.Tan(pi / 2 - epsr) * 3, v27.Y + (Math.Tan(pi / 2 - epsr) * 5));
            Vector2 v30 = new Vector2(v29.X + Math.Tan(pi / 2 - epsr) * 25, v29.Y + Math.Tan(pi / 2 - epsr) * 6);
            //
            Vector2 v31 = new Vector2(v30.X + Math.Tan(pi / 2 - epsr) * 5, v30.Y - (Math.Tan(pi / 2 - epsr) * 3));
            Vector2 v32 = new Vector2(v31.X + Math.Tan(pi / 2 - epsr) * 6, v31.Y - Math.Tan(pi / 2 - epsr) * 25);
            //
            Vector2 v33 = new Vector2(v32.X - Math.Tan(pi / 2 - epsr) * 3, v32.Y - (Math.Tan(pi / 2 - epsr) * 5));
            //
            Vector2 v34 = new Vector2(v22.X - h / 5, v22.Y);
            //
            Vector2 v35 = new Vector2(v32.X, v32.Y - h / 2);
            //
            Vector2 v36 = new Vector2(v28.X - Math.Tan(pi / 2 - epsr) * 18, v28.Y - Math.Tan(pi / 2 - epsr) * 5);
            // 线段
            //主视图
            //Vector2[] Line1 = { v1, v2 };
            //fun.drawBLine(dxf, Line1, 0.12, contour);
            //Vector2[] Line2 = { v1, v3 };
            //fun.drawBLine(dxf, Line2, 0.12, contour);
            //Vector2[] Line3 = { v2, v4 };
            //fun.drawBLine(dxf, Line3, 0.12, contour);
            //Vector2[] Line4 = { v5, v4 };
            //fun.drawBLine(dxf, Line4, 0.12, contour);
            //Vector2[] Line5 = { v6, v4 };
            //fun.drawBLine(dxf, Line5, 0.12, contour);
            //Vector2[] Line6 = { v5, v7 };
            //fun.drawBLine(dxf, Line6, 0.12, contour);
            //Vector2[] Line7 = { v5, v8 };
            //fun.drawBLine(dxf, Line7, 0.12, contour);
            //Vector2[] Line8 = { v9, v8 };
            //fun.drawBLine(dxf, Line8, 0.12, contour);
            //LwPolyline Arc8 = new LwPolyline();
            //Arc8.Vertexes.Add(new LwPolylineVertex(v8));
            //Arc8.Vertexes.Add(new LwPolylineVertex(v10));
            //Arc8.Vertexes[0].Bulge = -Math.Tan(pi / 2 - epsr) * 1.6;
            //fun.PolyFill(dxf, Arc8, 0.12, contour);
            //LwPolyline Arc1 = new LwPolyline();
            //Arc1.Vertexes.Add(new LwPolylineVertex(v9));
            //Arc1.Vertexes.Add(new LwPolylineVertex(v11));
            //Arc1.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            //fun.PolyFill(dxf, Arc1, 0.12, contour);
            //Vector2[] Line9 = { v11, v12 };
            //fun.drawBLine(dxf, Line9, 0.12, contour);
            //Vector2[] Line10 = { v3, v12 };
            //fun.drawBLine(dxf, Line10, 0.12, contour);
            //LwPolyline Arc2 = new LwPolyline();
            //Arc2.Vertexes.Add(new LwPolylineVertex(v12));
            //Arc2.Vertexes.Add(new LwPolylineVertex(v13));
            //Arc2.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            //fun.PolyFill(dxf, Arc2, 0.12, contour);
            //Vector2[] Line11 = { v14, v13 };
            //fun.drawBLine(dxf, Line11, 0.12, contour);
            //LwPolyline Arc3 = new LwPolyline();
            //Arc3.Vertexes.Add(new LwPolylineVertex(v14));
            //Arc3.Vertexes.Add(new LwPolylineVertex(v15));
            //Arc3.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            //fun.PolyFill(dxf, Arc3, 0.12, contour);
            //Vector2[] Line12 = { v15, v10 };
            //fun.drawBLine(dxf, Line12, 0.12, contour);
            //Vector2[] Line13 = { v17, v14 };
            //fun.drawBLine(dxf, Line13, 0.1, skdimensioning);
            //Vector2[] Line14 = { v18, v10 };
            //fun.drawBLine(dxf, Line14, 0.1, skdimensioning);
            //
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 1;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 1.8;
            double offset = 6;
            LinearDimension dim1 = new LinearDimension(new Line(v1, v2), offset * 2, 90, dimensionStyle);
            dim1.UserText = "16 ";
            dxf.AddEntity(dim1);
            LinearDimension dim2 = new LinearDimension(new Line(v14, v2), offset * 8, 360, dimensionStyle);
            dim2.UserText = "100 ";
            dxf.AddEntity(dim2);
            //LinearDimension dim3 = new LinearDimension(new Line(v15, v3), offset * 2, 270, dimensionStyle);
            //dim3.UserText = "17 ";
            //dxf.AddEntity(dim3);
            //LinearDimension dim4 = new LinearDimension(new Line(v14, v4), offset * 4, 360, dimensionStyle);
            //dim4.UserText = "25 ";
            //dxf.AddEntity(dim4);
            //LinearDimension dim5 = new LinearDimension(new Line(v16, v14), offset * 6, 360, dimensionStyle);
            //dim5.UserText = "30 ";
            //dxf.AddEntity(dim5);
            //Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v14, v17), new Line(v10, v18), offset * 3, dimensionStyle);
            //angdim1.UserText = "75°";
            //dxf.AddEntity(angdim1);
            ////
            ///
            //Vector2[] Line15 = { v19, v20 };
            //fun.drawBLine(dxf, Line15, 0.12, contour);
            //Vector2[] Line16 = { v19, v21 };
            //fun.drawBLine(dxf, Line16, 0.12, contour);
            //Vector2[] Line17 = { v20, v22 };
            //fun.drawBLine(dxf, Line17, 0.12, contour);
            //Vector2[] Line18 = { v23, v22 };
            //fun.drawBLine(dxf, Line18, 0.12, contour);
            //Vector2[] Line19 = { v24, v22 };
            //fun.drawBLine(dxf, Line19, 0.12, contour);
            //Vector2[] Line20 = { v23, v25 };
            //fun.drawBLine(dxf, Line20, 0.12, contour);
            //Vector2[] Line21 = { v23, v26 };
            //fun.drawBLine(dxf, Line21, 0.12, contour);
            //Vector2[] Line22 = { v27, v26 };
            //fun.drawBLine(dxf, Line22, 0.12, contour);
            //LwPolyline Arc4 = new LwPolyline();
            //Arc4.Vertexes.Add(new LwPolylineVertex(v26));
            //Arc4.Vertexes.Add(new LwPolylineVertex(v28));
            //Arc4.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            //fun.PolyFill(dxf, Arc4, 0.12, contour);
            //LwPolyline Arc5 = new LwPolyline();
            //Arc5.Vertexes.Add(new LwPolylineVertex(v27));
            //Arc5.Vertexes.Add(new LwPolylineVertex(v29));
            //Arc5.Vertexes[0].Bulge = -Math.Tan(pi / 2 - epsr) * 1.6;
            //fun.PolyFill(dxf, Arc5, 0.12, contour);
            //Vector2[] Line23 = { v29, v30 };
            //fun.drawBLine(dxf, Line23, 0.12, contour);
            //Vector2[] Line24 = { v21, v30 };
            //fun.drawBLine(dxf, Line24, 0.12, contour);
            //LwPolyline Arc6 = new LwPolyline();
            //Arc6.Vertexes.Add(new LwPolylineVertex(v31));
            //Arc6.Vertexes.Add(new LwPolylineVertex(v30));
            //Arc6.Vertexes[0].Bulge = Math.Tan(pi / 2 - epsr) * 1.6;
            //fun.PolyFill(dxf, Arc6, 0.12, contour);
            //Vector2[] Line25 = { v31, v32 };
            //fun.drawBLine(dxf, Line25, 0.12, contour);
            //LwPolyline Arc7 = new LwPolyline();
            //Arc7.Vertexes.Add(new LwPolylineVertex(v32));
            //Arc7.Vertexes.Add(new LwPolylineVertex(v33));
            //Arc7.Vertexes[0].Bulge = -Math.Tan(pi / 2 - epsr) * 1.6;
            //fun.PolyFill(dxf, Arc7, 0.12, contour);
            //Vector2[] Line26 = { v28, v33 };
            //fun.drawBLine(dxf, Line26, 0.12, contour);
            //Vector2[] Line27 = { v35, v32 };
            //fun.drawBLine(dxf, Line27, 0.1, skdimensioning);
            //Vector2[] Line28 = { v36, v28 };
            //fun.drawBLine(dxf, Line28, 0.1, skdimensioning);
            LinearDimension dim6 = new LinearDimension(new Line(v19, v20), offset * 2, 90, dimensionStyle);
            dim6.UserText = "16 ";
            dxf.AddEntity(dim6);
            LinearDimension dim7 = new LinearDimension(new Line(v32, v20), offset * 8, 180, dimensionStyle);
            dim7.UserText = "100 ";
            dxf.AddEntity(dim7);
            //LinearDimension dim8 = new LinearDimension(new Line(v33, v21), offset * 2, 270, dimensionStyle);
            //dim8.UserText = "17 ";
            //dxf.AddEntity(dim8);
            //LinearDimension dim9 = new LinearDimension(new Line(v32, v22), offset * 4, 180, dimensionStyle);
            //dim9.UserText = "25 ";
            //dxf.AddEntity(dim9);
            //LinearDimension dim10 = new LinearDimension(new Line(v34, v32), offset * 6, 180, dimensionStyle);
            //dim10.UserText = "30 ";
            //dxf.AddEntity(dim10);
            //Angular2LineDimension angdim2 = new Angular2LineDimension(new Line(v32, v35), new Line(v28, v36), offset * 2, dimensionStyle);
            //angdim2.UserText = "75°";
            //dxf.AddEntity(angdim2);
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }

        //
        public static void Matingpoint30(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 3;
            double pi = Math.PI;
            double epsr = 140 * pi / 180;
            double l = 60;
            double l1 = 32;
            double l2 = 17.4;
            double r = 1.45;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h);
            Vector2 v3 = new Vector2(v1.X + (l - l1), v1.Y);
            Vector2 v4 = new Vector2(v1.X + (l - l1), v2.Y);
            //
            Vector2 v5 = new Vector2(v3.X + (l1 - l2), v3.Y);
            Vector2 v6 = new Vector2(v4.X + (l1 - l2), v4.Y);
            //
            Vector2 v7 = new Vector2(v3.X + (l1 - l2) / 2, v3.Y);
            Vector2 v8 = new Vector2(v4.X + (l1 - l2) / 2, v4.Y);
            //
            Vector2 v9 = new Vector2(v5.X - (l1 - l2) / 6, v5.Y + (l1 - l2) / 8 * Math.Cos(epsr / 2));
            Vector2 v10 = new Vector2(v5.X, v9.Y + (l1 - l2) / 6 * Math.Cos(epsr / 2));
            //
            Vector2 v11 = new Vector2(v5.X + (l1 - l2) / 6, v5.Y + (l1 - l2) / 8 * Math.Cos(epsr / 2));
            Vector2 v12 = new Vector2(v11.X + (l1 - l2) / 12, v11.Y - (l1 - l2) / 12 * Math.Cos(epsr / 2));
            //
            Vector2 v13 = new Vector2(v11.X + (l1 - l2) / 5, v11.Y - (l1 - l2) / 6 * Math.Cos(epsr / 2));
            //
            Vector2 v14 = new Vector2(v13.X + l2 / 5, v13.Y);
            //
            Vector2 v15 = new Vector2(v6.X + l2, v6.Y);
            //
            Vector2 v16 = new Vector2(v14.X + l2 / 3.8, v14.Y + (l1 - l2) / 6 * Math.Cos(epsr / 2));
            Vector2 v17 = new Vector2(v6.X + (l1 - l2) / 3.8 * Math.Cos(epsr / 2), v6.Y - (l1 - l2) / 10 * Math.Cos(epsr / 2));
            Vector2 v18 = new Vector2(v17.X + l2 / 2.6, v17.Y + (l1 - l2) / 100 * Math.Cos(epsr / 2));
            //
            Vector2 v19 = new Vector2(v18.X + l2 / 4, v18.Y + (l1 - l2) / 100 * Math.Cos(epsr / 2));
            //
            Vector2 v20 = new Vector2(v16.X + l2 / 10, v1.Y);
            Vector2 v21 = new Vector2(v20.X, v20.Y + l2 / 10);
            //
            Vector2 v22 = new Vector2(v21.X + l2 / 50, v21.Y + l2 / 70);
            Vector2 v23 = new Vector2(v22.X - l2 / 50, v22.Y + l2 / 18 + l2 / 150);
            //
            Vector2 v24 = new Vector2(v23.X - l2 / 10, v23.Y - l2 / 100);
            Vector2 v25 = new Vector2(v24.X - l2 / 22, v24.Y - l2 / 50);
            //
            Vector2 v26 = new Vector2(v11.X - l2 / 20, v11.Y + l2 / 50);
            //
            Vector2 v27 = new Vector2(v21.X + l2 / 20, v21.Y + l2 / 20);
            Vector2 v28 = new Vector2(v21.X + l2 / 20, v21.Y - l2 / 20);
            // 线段
            //主视图
            Vector2[] Line1 = { v1, v2 };
            fun.drawBLine(dxf, Line1, 0.5, contour);
            Vector2[] Line2 = { v1, v3 };
            fun.drawBLine(dxf, Line2, 0.5, contour);
            Vector2[] Line3 = { v4, v2 };
            fun.drawBLine(dxf, Line3, 0.5, contour);
            Vector2[] Line4 = { v3, v5 };
            fun.drawBLine(dxf, Line4, 0.5, contour);
            Vector2[] Line5 = { v6, v4 };
            fun.drawBLine(dxf, Line5, 0.5, contour);
            Vector2[] Line6 = { v8, v7 };
            fun.drawBLine(dxf, Line6, 0.5, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            Arc1.Vertexes.Add(new LwPolylineVertex(v9));
            Arc1.Vertexes[0].Bulge = -Math.Cos(epsr / 2) / 2;
            fun.PolyFill(dxf, Arc1, 0.5, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v10));
            Arc2.Vertexes.Add(new LwPolylineVertex(v9));
            Arc2.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 2;
            fun.PolyFill(dxf, Arc2, 0.5, contour);
            Vector2[] Line7 = { v5, v10 };
            fun.drawBLine(dxf, Line7, 0.5, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v11));
            Arc3.Vertexes.Add(new LwPolylineVertex(v5));
            Arc3.Vertexes[0].Bulge = -Math.Cos(epsr / 2) / 2;
            fun.PolyFill(dxf, Arc3, 0.5, contour);
            Vector2[] Line8 = { v11, v10 };
            fun.drawBLine(dxf, Line8, 0.5, contour);
            Vector2[] Line9 = { v11, v12 };
            fun.drawBLine(dxf, Line9, 0.5, contour);
            Vector2[] Line10 = { v14, v13 };
            fun.drawBLine(dxf, Line10, 0.5, contour);
            Vector2[] Line11 = { v14, v6 };
            fun.drawBLine(dxf, Line11, 0.5, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v12));
            Arc4.Vertexes.Add(new LwPolylineVertex(v13));
            Arc4.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 4.6;
            fun.PolyFill(dxf, Arc4, 0.5, contour);
            Vector2[] Line12 = { v15, v6 };
            fun.drawBLine(dxf, Line12, 0.25, skdimensioning);
            LwPolyline Arc5 = new LwPolyline();
            Arc5.Vertexes.Add(new LwPolylineVertex(v14));
            Arc5.Vertexes.Add(new LwPolylineVertex(v16));
            Arc5.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 4.6;
            fun.PolyFill(dxf, Arc5, 0.5, contour);
            LwPolyline Arc6 = new LwPolyline();
            Arc6.Vertexes.Add(new LwPolylineVertex(v18));
            Arc6.Vertexes.Add(new LwPolylineVertex(v17));
            Arc6.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 2.5;
            fun.PolyFill(dxf, Arc6, 0.5, contour);
            Vector2[] Line13 = { v18, v16 };
            fun.drawBLine(dxf, Line13, 0.5, contour);
            LwPolyline Arc7 = new LwPolyline();
            Arc7.Vertexes.Add(new LwPolylineVertex(v18));
            Arc7.Vertexes.Add(new LwPolylineVertex(v19));
            Arc7.Vertexes[0].Bulge = -Math.Cos(epsr / 2) / 2.3;
            fun.PolyFill(dxf, Arc7, 0.5, contour);
            Vector2[] Line14 = { v20, v16 };
            fun.drawBLine(dxf, Line14, 0.5, contour);
            Vector2[] Line15 = { v20, v21 };
            fun.drawBLine(dxf, Line15, 0.5, contour);
            Vector2[] Line16 = { v19, v21 };
            fun.drawBLine(dxf, Line16, 0.5, contour);
            Vector2[] Line17 = { v22, v21 };
            fun.drawBLine(dxf, Line17, 0.5, contour);
            Vector2[] Line18 = { v22, v23 };
            fun.drawBLine(dxf, Line18, 0.5, contour);
            Vector2[] Line19 = { v24, v23 };
            fun.drawBLine(dxf, Line19, 0.5, contour);
            LwPolyline Arc8 = new LwPolyline();
            Arc8.Vertexes.Add(new LwPolylineVertex(v24));
            Arc8.Vertexes.Add(new LwPolylineVertex(v25));
            Arc8.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 2.8;
            fun.PolyFill(dxf, Arc8, 0.5, contour);
            Vector2[] Line20 = { v27, v21 };
            fun.drawBLine(dxf, Line20, 0.25, skdimensioning);
            Vector2[] Line21 = { v28, v21 };
            fun.drawBLine(dxf, Line21, 0.25, skdimensioning);
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v1.X + l1 / 8 + l, v1.Y + h / 1.8), new Vector2(v1.X - h / 8, v1.Y + h / 1.8) },0.25, centre, Linetype.Center);
            //
            //
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 1;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 1.8;
            double offset = 6;
            LinearDimension dim1 = new LinearDimension(new Line(v1, v2), offset * 2, 90, dimensionStyle);
            dim1.UserText = " 3 ";
            dxf.AddEntity(dim1);
            LinearDimension dim2 = new LinearDimension(new Line(v22, v2), offset * 4, 360, dimensionStyle);
            dim2.UserText = " 60 ";
            dxf.AddEntity(dim2);
            LinearDimension dim3 = new LinearDimension(new Line(v22, v4), offset * 2.6, 360, dimensionStyle);
            dim3.UserText = " 32 ";
            dxf.AddEntity(dim3);
            LinearDimension dim4 = new LinearDimension(new Line(v22, v26), offset * 1.6, 360, dimensionStyle);
            dim4.UserText = " 17.4 ";
            dxf.AddEntity(dim4);
            LinearDimension dim5 = new LinearDimension(new Line(v23, v20), offset * 4, 270, dimensionStyle);
            dim5.UserText = " Φ2.90 ";
            dxf.AddEntity(dim5);
            Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v21, v27), new Line(v21, v28), offset * 6, dimensionStyle);
            angdim1.UserText = "140°";
            dxf.AddEntity(angdim1);
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint31(Dictionary<string, Object> data)   //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 3;
            double pi = Math.PI;
            double epsr = 140 * pi / 180;
            double l = 60;
            double l1 = 32;
            double l2 = 17.4;
            double r = 1.45;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h);
            Vector2 v3 = new Vector2(v1.X + (l - l1), v1.Y);
            Vector2 v4 = new Vector2(v1.X + (l - l1), v2.Y);
            //
            Vector2 v5 = new Vector2(v3.X + (l1 - l2), v3.Y);
            Vector2 v6 = new Vector2(v4.X + (l1 - l2), v4.Y);
            //
            Vector2 v7 = new Vector2(v3.X + (l1 - l2) / 2, v3.Y);
            Vector2 v8 = new Vector2(v4.X + (l1 - l2) / 2, v4.Y);
            //
            Vector2 v9 = new Vector2(v5.X - (l1 - l2) / 6, v5.Y + (l1 - l2) / 8 * Math.Cos(epsr / 2));
            Vector2 v10 = new Vector2(v5.X, v9.Y + (l1 - l2) / 6 * Math.Cos(epsr / 2));
            //
            Vector2 v11 = new Vector2(v5.X + (l1 - l2) / 6, v5.Y + (l1 - l2) / 8 * Math.Cos(epsr / 2));
            Vector2 v12 = new Vector2(v11.X + (l1 - l2) / 12, v11.Y - (l1 - l2) / 12 * Math.Cos(epsr / 2));
            //
            Vector2 v13 = new Vector2(v11.X + (l1 - l2) / 5, v11.Y - (l1 - l2) / 6 * Math.Cos(epsr / 2));
            //
            Vector2 v14 = new Vector2(v13.X + l2 / 5, v13.Y);
            //
            Vector2 v15 = new Vector2(v6.X + l2, v6.Y);
            //
            Vector2 v16 = new Vector2(v14.X + l2 / 3.8, v14.Y + (l1 - l2) / 6 * Math.Cos(epsr / 2));
            Vector2 v17 = new Vector2(v6.X + (l1 - l2) / 3.8 * Math.Cos(epsr / 2), v6.Y - (l1 - l2) / 10 * Math.Cos(epsr / 2));
            Vector2 v18 = new Vector2(v17.X + l2 / 2.6, v17.Y + (l1 - l2) / 100 * Math.Cos(epsr / 2));
            //
            Vector2 v19 = new Vector2(v18.X + l2 / 4, v18.Y + (l1 - l2) / 100 * Math.Cos(epsr / 2));
            //
            Vector2 v20 = new Vector2(v16.X + l2 / 10, v1.Y);
            Vector2 v21 = new Vector2(v20.X, v20.Y + l2 / 10);
            //
            Vector2 v22 = new Vector2(v21.X + l2 / 50, v21.Y + l2 / 70);
            Vector2 v23 = new Vector2(v22.X - l2 / 50, v22.Y + l2 / 18 + l2 / 150);
            //
            Vector2 v24 = new Vector2(v23.X - l2 / 10, v23.Y - l2 / 100);
            Vector2 v25 = new Vector2(v24.X - l2 / 22, v24.Y - l2 / 50);
            //
            Vector2 v26 = new Vector2(v11.X - l2 / 20, v11.Y + l2 / 50);
            //
            Vector2 v27 = new Vector2(v21.X + l2 / 20, v21.Y + l2 / 20);
            Vector2 v28 = new Vector2(v21.X + l2 / 20, v21.Y - l2 / 20);
            // 线段
            //主视图
            //Vector2[] Line1 = { v1, v2 };
            //fun.drawBLine(dxf, Line1, 0.12, contour);
            //Vector2[] Line2 = { v1, v3 };
            //fun.drawBLine(dxf, Line2, 0.12, contour);
            //Vector2[] Line3 = { v4, v2 };
            //fun.drawBLine(dxf, Line3, 0.12, contour);
            Vector2[] Line4 = { v3, v5 };
            fun.drawBLine(dxf, Line4, 0.5, contour);
            Vector2[] Line5 = { v6, v4 };
            fun.drawBLine(dxf, Line5, 0.5, contour);
            Vector2[] Line6 = { v8, v7 };
            fun.drawBLine(dxf, Line6, 0.5, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            Arc1.Vertexes.Add(new LwPolylineVertex(v9));
            Arc1.Vertexes[0].Bulge = -Math.Cos(epsr / 2) / 2;
            fun.PolyFill(dxf, Arc1, 0.5, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v10));
            Arc2.Vertexes.Add(new LwPolylineVertex(v9));
            Arc2.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 2;
            fun.PolyFill(dxf, Arc2, 0.5, contour);
            Vector2[] Line7 = { v5, v10 };
            fun.drawBLine(dxf, Line7, 0.5, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v11));
            Arc3.Vertexes.Add(new LwPolylineVertex(v5));
            Arc3.Vertexes[0].Bulge = -Math.Cos(epsr / 2) / 2;
            fun.PolyFill(dxf, Arc3, 0.5, contour);
            Vector2[] Line8 = { v11, v10 };
            fun.drawBLine(dxf, Line8, 0.5, contour);
            Vector2[] Line9 = { v11, v12 };
            fun.drawBLine(dxf, Line9, 0.5, contour);
            Vector2[] Line10 = { v14, v13 };
            fun.drawBLine(dxf, Line10, 0.5, contour);
            Vector2[] Line11 = { v14, v6 };
            fun.drawBLine(dxf, Line11, 0.5, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v12));
            Arc4.Vertexes.Add(new LwPolylineVertex(v13));
            Arc4.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 4.6;
            fun.PolyFill(dxf, Arc4, 0.5, contour);
            //Vector2[] Line12 = { v15, v6 };
            //fun.drawBLine(dxf, Line12, 0.08, skdimensioning);
            LwPolyline Arc5 = new LwPolyline();
            Arc5.Vertexes.Add(new LwPolylineVertex(v14));
            Arc5.Vertexes.Add(new LwPolylineVertex(v16));
            Arc5.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 4.6;
            fun.PolyFill(dxf, Arc5, 0.5, contour);
            LwPolyline Arc6 = new LwPolyline();
            Arc6.Vertexes.Add(new LwPolylineVertex(v18));
            Arc6.Vertexes.Add(new LwPolylineVertex(v17));
            Arc6.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 2.5;
            fun.PolyFill(dxf, Arc6, 0.5, contour);
            Vector2[] Line13 = { v18, v16 };
            fun.drawBLine(dxf, Line13, 0.5, contour);
            LwPolyline Arc7 = new LwPolyline();
            Arc7.Vertexes.Add(new LwPolylineVertex(v18));
            Arc7.Vertexes.Add(new LwPolylineVertex(v19));
            Arc7.Vertexes[0].Bulge = -Math.Cos(epsr / 2) / 2.3;
            fun.PolyFill(dxf, Arc7, 0.5, contour);
            Vector2[] Line14 = { v20, v16 };
            fun.drawBLine(dxf, Line14, 0.5, contour);
            Vector2[] Line15 = { v20, v21 };
            fun.drawBLine(dxf, Line15, 0.5, contour);
            Vector2[] Line16 = { v19, v21 };
            fun.drawBLine(dxf, Line16, 0.5, contour);
            Vector2[] Line17 = { v22, v21 };
            fun.drawBLine(dxf, Line17, 0.5, contour);
            Vector2[] Line18 = { v22, v23 };
            fun.drawBLine(dxf, Line18, 0.5, contour);
            Vector2[] Line19 = { v24, v23 };
            fun.drawBLine(dxf, Line19, 0.5, contour);
            LwPolyline Arc8 = new LwPolyline();
            Arc8.Vertexes.Add(new LwPolylineVertex(v24));
            Arc8.Vertexes.Add(new LwPolylineVertex(v25));
            Arc8.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 2.8;
            fun.PolyFill(dxf, Arc8, 0.5, contour);
            //Vector2[] Line20 = { v27, v21 };
            //fun.drawBLine(dxf, Line20, 0.08, skdimensioning);
            //Vector2[] Line21 = { v28, v21 };
            //fun.drawBLine(dxf, Line21, 0.08, skdimensioning);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v1.X + l1 / 8 + l, v1.Y + h / 1.8), new Vector2(v1.X - h / 8, v1.Y + h / 1.8) }, centre, Linetype.Center);
            //
            //
            //DimensionStyle dimensionStyle = fun.CreateDimStyle();
            //dimensionStyle.ArrowSize = 1;
            //dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.TextHeight = 1.8;
            //double offset = 6;
            //LinearDimension dim1 = new LinearDimension(new Line(v1, v2), offset * 2, 90, dimensionStyle);
            //dim1.UserText = " 3 ";
            //dxf.AddEntity(dim1);
            //LinearDimension dim2 = new LinearDimension(new Line(v22, v2), offset * 4, 360, dimensionStyle);
            //dim2.UserText = " 60 ";
            //dxf.AddEntity(dim2);
            //LinearDimension dim3 = new LinearDimension(new Line(v22, v4), offset * 2.6, 360, dimensionStyle);
            //dim3.UserText = " 32 ";
            //dxf.AddEntity(dim3);
            //LinearDimension dim4 = new LinearDimension(new Line(v22, v26), offset * 1.6, 360, dimensionStyle);
            //dim4.UserText = " 17.4 ";
            //dxf.AddEntity(dim4);
            //LinearDimension dim5 = new LinearDimension(new Line(v23, v20), offset * 4, 270, dimensionStyle);
            //dim5.UserText = " Φ2.90 ";
            //dxf.AddEntity(dim5);
            //Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v21, v27), new Line(v21, v28), offset * 6, dimensionStyle);
            //angdim1.UserText = "140°";
            //dxf.AddEntity(angdim1);
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint32(Dictionary<string, Object> data)  //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 3;
            double pi = Math.PI;
            double epsr = 140 * pi / 180;
            double l = 60;
            double l1 = 32;
            double l2 = 17.4;
            double r = 1.45;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h);
            Vector2 v3 = new Vector2(v1.X + (l - l1), v1.Y);
            Vector2 v4 = new Vector2(v1.X + (l - l1), v2.Y);
            //
            Vector2 v5 = new Vector2(v3.X + (l1 - l2), v3.Y);
            Vector2 v6 = new Vector2(v4.X + (l1 - l2), v4.Y);
            //
            Vector2 v7 = new Vector2(v3.X + (l1 - l2) / 2, v3.Y);
            Vector2 v8 = new Vector2(v4.X + (l1 - l2) / 2, v4.Y);
            //
            Vector2 v9 = new Vector2(v5.X - (l1 - l2) / 6, v5.Y + (l1 - l2) / 8 * Math.Cos(epsr / 2));
            Vector2 v10 = new Vector2(v5.X, v9.Y + (l1 - l2) / 6 * Math.Cos(epsr / 2));
            //
            Vector2 v11 = new Vector2(v5.X + (l1 - l2) / 6, v5.Y + (l1 - l2) / 8 * Math.Cos(epsr / 2));
            Vector2 v12 = new Vector2(v11.X + (l1 - l2) / 12, v11.Y - (l1 - l2) / 12 * Math.Cos(epsr / 2));
            //
            Vector2 v13 = new Vector2(v11.X + (l1 - l2) / 5, v11.Y - (l1 - l2) / 6 * Math.Cos(epsr / 2));
            //
            Vector2 v14 = new Vector2(v13.X + l2 / 5, v13.Y);
            //
            Vector2 v15 = new Vector2(v6.X + l2, v6.Y);
            //
            Vector2 v16 = new Vector2(v14.X + l2 / 3.8, v14.Y + (l1 - l2) / 6 * Math.Cos(epsr / 2));
            Vector2 v17 = new Vector2(v6.X + (l1 - l2) / 3.8 * Math.Cos(epsr / 2), v6.Y - (l1 - l2) / 10 * Math.Cos(epsr / 2));
            Vector2 v18 = new Vector2(v17.X + l2 / 2.6, v17.Y + (l1 - l2) / 100 * Math.Cos(epsr / 2));
            //
            Vector2 v19 = new Vector2(v18.X + l2 / 4, v18.Y + (l1 - l2) / 100 * Math.Cos(epsr / 2));
            //
            Vector2 v20 = new Vector2(v16.X + l2 / 10, v1.Y);
            Vector2 v21 = new Vector2(v20.X, v20.Y + l2 / 10);
            //
            Vector2 v22 = new Vector2(v21.X + l2 / 50, v21.Y + l2 / 70);
            Vector2 v23 = new Vector2(v22.X - l2 / 50, v22.Y + l2 / 18 + l2 / 150);
            //
            Vector2 v24 = new Vector2(v23.X - l2 / 10, v23.Y - l2 / 100);
            Vector2 v25 = new Vector2(v24.X - l2 / 22, v24.Y - l2 / 50);
            //
            Vector2 v26 = new Vector2(v11.X - l2 / 20, v11.Y + l2 / 50);
            //
            Vector2 v27 = new Vector2(v21.X + l2 / 20, v21.Y + l2 / 20);
            Vector2 v28 = new Vector2(v21.X + l2 / 20, v21.Y - l2 / 20);
            // 线段
            //主视图
            //Vector2[] Line1 = { v1, v2 };
            //fun.drawBLine(dxf, Line1, 0.5, contour);
            //Vector2[] Line2 = { v1, v3 };
            //fun.drawBLine(dxf, Line2, 0.5, contour);
            //Vector2[] Line3 = { v4, v2 };
            //fun.drawBLine(dxf, Line3, 0.5, contour);
            //Vector2[] Line4 = { v3, v5 };
            //fun.drawBLine(dxf, Line4, 0.5, contour);
            //Vector2[] Line5 = { v6, v4 };
            //fun.drawBLine(dxf, Line5, 0.5, contour);
            //Vector2[] Line6 = { v8, v7 };
            //fun.drawBLine(dxf, Line6, 0.5, contour);
            //LwPolyline Arc1 = new LwPolyline();
            //Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            //Arc1.Vertexes.Add(new LwPolylineVertex(v9));
            //Arc1.Vertexes[0].Bulge = -Math.Cos(epsr / 2) / 2;
            //fun.PolyFill(dxf, Arc1, 0.5, contour);
            //LwPolyline Arc2 = new LwPolyline();
            //Arc2.Vertexes.Add(new LwPolylineVertex(v10));
            //Arc2.Vertexes.Add(new LwPolylineVertex(v9));
            //Arc2.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 2;
            //fun.PolyFill(dxf, Arc2, 0.5, contour);
            //Vector2[] Line7 = { v5, v10 };
            //fun.drawBLine(dxf, Line7, 0.5, contour);
            //LwPolyline Arc3 = new LwPolyline();
            //Arc3.Vertexes.Add(new LwPolylineVertex(v11));
            //Arc3.Vertexes.Add(new LwPolylineVertex(v5));
            //Arc3.Vertexes[0].Bulge = -Math.Cos(epsr / 2) / 2;
            //fun.PolyFill(dxf, Arc3, 0.5, contour);
            //Vector2[] Line8 = { v11, v10 };
            //fun.drawBLine(dxf, Line8, 0.5, contour);
            //Vector2[] Line9 = { v11, v12 };
            //fun.drawBLine(dxf, Line9, 0.5, contour);
            //Vector2[] Line10 = { v14, v13 };
            //fun.drawBLine(dxf, Line10, 0.5, contour);
            //Vector2[] Line11 = { v14, v6 };
            //fun.drawBLine(dxf, Line11, 0.5, contour);
            //LwPolyline Arc4 = new LwPolyline();
            //Arc4.Vertexes.Add(new LwPolylineVertex(v12));
            //Arc4.Vertexes.Add(new LwPolylineVertex(v13));
            //Arc4.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 4.6;
            //fun.PolyFill(dxf, Arc4, 0.12, contour);
            //Vector2[] Line12 = { v15, v6 };
            //fun.drawBLine(dxf, Line12, 0.08, skdimensioning);
            //LwPolyline Arc5 = new LwPolyline();
            //Arc5.Vertexes.Add(new LwPolylineVertex(v14));
            //Arc5.Vertexes.Add(new LwPolylineVertex(v16));
            //Arc5.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 4.6;
            //fun.PolyFill(dxf, Arc5, 0.12, contour);
            //LwPolyline Arc6 = new LwPolyline();
            //Arc6.Vertexes.Add(new LwPolylineVertex(v18));
            //Arc6.Vertexes.Add(new LwPolylineVertex(v17));
            //Arc6.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 2.5;
            //fun.PolyFill(dxf, Arc6, 0.12, contour);
            //Vector2[] Line13 = { v18, v16 };
            //fun.drawBLine(dxf, Line13, 0.12, contour);
            //LwPolyline Arc7 = new LwPolyline();
            //Arc7.Vertexes.Add(new LwPolylineVertex(v18));
            //Arc7.Vertexes.Add(new LwPolylineVertex(v19));
            //Arc7.Vertexes[0].Bulge = -Math.Cos(epsr / 2) / 2.3;
            //fun.PolyFill(dxf, Arc7, 0.12, contour);
            //Vector2[] Line14 = { v20, v16 };
            //fun.drawBLine(dxf, Line14, 0.12, contour);
            //Vector2[] Line15 = { v20, v21 };
            //fun.drawBLine(dxf, Line15, 0.12, contour);
            //Vector2[] Line16 = { v19, v21 };
            //fun.drawBLine(dxf, Line16, 0.12, contour);
            //Vector2[] Line17 = { v22, v21 };
            //fun.drawBLine(dxf, Line17, 0.12, contour);
            //Vector2[] Line18 = { v22, v23 };
            //fun.drawBLine(dxf, Line18, 0.12, contour);
            //Vector2[] Line19 = { v24, v23 };
            //fun.drawBLine(dxf, Line19, 0.12, contour);
            //LwPolyline Arc8 = new LwPolyline();
            //Arc8.Vertexes.Add(new LwPolylineVertex(v24));
            //Arc8.Vertexes.Add(new LwPolylineVertex(v25));
            //Arc8.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 2.8;
            //fun.PolyFill(dxf, Arc8, 0.12, contour);
            //Vector2[] Line20 = { v27, v21 };
            //fun.drawBLine(dxf, Line20, 0.08, skdimensioning);
            //Vector2[] Line21 = { v28, v21 };
            //fun.drawBLine(dxf, Line21, 0.08, skdimensioning);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v1.X + l1 / 8 + l, v1.Y + h / 1.8), new Vector2(v1.X - h / 8, v1.Y + h / 1.8) }, centre, Linetype.Center);
            ////
            //
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 1;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 1.8;
            double offset = 6;
            //LinearDimension dim1 = new LinearDimension(new Line(v1, v2), offset * 2, 90, dimensionStyle);
            //dim1.UserText = " 3 ";
            //dxf.AddEntity(dim1);
            //LinearDimension dim2 = new LinearDimension(new Line(v22, v2), offset * 4, 360, dimensionStyle);
            //dim2.UserText = " 60 ";
            //dxf.AddEntity(dim2);
            LinearDimension dim3 = new LinearDimension(new Line(v22, v4), offset * 2.6, 360, dimensionStyle);
            dim3.UserText = " 32 ";
            dxf.AddEntity(dim3);
            LinearDimension dim4 = new LinearDimension(new Line(v22, v26), offset * 1.6, 360, dimensionStyle);
            dim4.UserText = " 17.4 ";
            dxf.AddEntity(dim4);
            LinearDimension dim5 = new LinearDimension(new Line(v23, v20), offset * 4, 270, dimensionStyle);
            dim5.UserText = " Φ2.90 ";
            dxf.AddEntity(dim5);
            Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v21, v27), new Line(v21, v28), offset * 6, dimensionStyle);
            angdim1.UserText = "140°";
            dxf.AddEntity(angdim1);
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint33(Dictionary<string, Object> data)   //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 3;
            double pi = Math.PI;
            double epsr = 140 * pi / 180;
            double l = 60;
            double l1 = 32;
            double l2 = 17.4;
            double r = 1.45;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h);
            Vector2 v3 = new Vector2(v1.X + (l - l1), v1.Y);
            Vector2 v4 = new Vector2(v1.X + (l - l1), v2.Y);
            //
            Vector2 v5 = new Vector2(v3.X + (l1 - l2), v3.Y);
            Vector2 v6 = new Vector2(v4.X + (l1 - l2), v4.Y);
            //
            Vector2 v7 = new Vector2(v3.X + (l1 - l2) / 2, v3.Y);
            Vector2 v8 = new Vector2(v4.X + (l1 - l2) / 2, v4.Y);
            //
            Vector2 v9 = new Vector2(v5.X - (l1 - l2) / 6, v5.Y + (l1 - l2) / 8 * Math.Cos(epsr / 2));
            Vector2 v10 = new Vector2(v5.X, v9.Y + (l1 - l2) / 6 * Math.Cos(epsr / 2));
            //
            Vector2 v11 = new Vector2(v5.X + (l1 - l2) / 6, v5.Y + (l1 - l2) / 8 * Math.Cos(epsr / 2));
            Vector2 v12 = new Vector2(v11.X + (l1 - l2) / 12, v11.Y - (l1 - l2) / 12 * Math.Cos(epsr / 2));
            //
            Vector2 v13 = new Vector2(v11.X + (l1 - l2) / 5, v11.Y - (l1 - l2) / 6 * Math.Cos(epsr / 2));
            //
            Vector2 v14 = new Vector2(v13.X + l2 / 5, v13.Y);
            //
            Vector2 v15 = new Vector2(v6.X + l2, v6.Y);
            //
            Vector2 v16 = new Vector2(v14.X + l2 / 3.8, v14.Y + (l1 - l2) / 6 * Math.Cos(epsr / 2));
            Vector2 v17 = new Vector2(v6.X + (l1 - l2) / 3.8 * Math.Cos(epsr / 2), v6.Y - (l1 - l2) / 10 * Math.Cos(epsr / 2));
            Vector2 v18 = new Vector2(v17.X + l2 / 2.6, v17.Y + (l1 - l2) / 100 * Math.Cos(epsr / 2));
            //
            Vector2 v19 = new Vector2(v18.X + l2 / 4, v18.Y + (l1 - l2) / 100 * Math.Cos(epsr / 2));
            //
            Vector2 v20 = new Vector2(v16.X + l2 / 10, v1.Y);
            Vector2 v21 = new Vector2(v20.X, v20.Y + l2 / 10);
            //
            Vector2 v22 = new Vector2(v21.X + l2 / 50, v21.Y + l2 / 70);
            Vector2 v23 = new Vector2(v22.X - l2 / 50, v22.Y + l2 / 18 + l2 / 150);
            //
            Vector2 v24 = new Vector2(v23.X - l2 / 10, v23.Y - l2 / 100);
            Vector2 v25 = new Vector2(v24.X - l2 / 22, v24.Y - l2 / 50);
            //
            Vector2 v26 = new Vector2(v11.X - l2 / 20, v11.Y + l2 / 50);
            //
            Vector2 v27 = new Vector2(v21.X + l2 / 20, v21.Y + l2 / 20);
            Vector2 v28 = new Vector2(v21.X + l2 / 20, v21.Y - l2 / 20);
            // 线段
            //主视图
            //Vector2[] Line1 = { v1, v2 };
            //fun.drawBLine(dxf, Line1, 0.12, contour);
            //Vector2[] Line2 = { v1, v3 };
            //fun.drawBLine(dxf, Line2, 0.12, contour);
            //Vector2[] Line3 = { v4, v2 };
            //fun.drawBLine(dxf, Line3, 0.12, contour);
            //Vector2[] Line4 = { v3, v5 };
            //fun.drawBLine(dxf, Line4, 0.12, contour);
            //Vector2[] Line5 = { v6, v4 };
            //fun.drawBLine(dxf, Line5, 0.12, contour);
            //Vector2[] Line6 = { v8, v7 };
            //fun.drawBLine(dxf, Line6, 0.12, contour);
            //LwPolyline Arc1 = new LwPolyline();
            //Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            //Arc1.Vertexes.Add(new LwPolylineVertex(v9));
            //Arc1.Vertexes[0].Bulge = -Math.Cos(epsr / 2) / 2;
            //fun.PolyFill(dxf, Arc1, 0.12, contour);
            //LwPolyline Arc2 = new LwPolyline();
            //Arc2.Vertexes.Add(new LwPolylineVertex(v10));
            //Arc2.Vertexes.Add(new LwPolylineVertex(v9));
            //Arc2.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 2;
            //fun.PolyFill(dxf, Arc2, 0.12, contour);
            //Vector2[] Line7 = { v5, v10 };
            //fun.drawBLine(dxf, Line7, 0.12, contour);
            //LwPolyline Arc3 = new LwPolyline();
            //Arc3.Vertexes.Add(new LwPolylineVertex(v11));
            //Arc3.Vertexes.Add(new LwPolylineVertex(v5));
            //Arc3.Vertexes[0].Bulge = -Math.Cos(epsr / 2) / 2;
            //fun.PolyFill(dxf, Arc3, 0.12, contour);
            //Vector2[] Line8 = { v11, v10 };
            //fun.drawBLine(dxf, Line8, 0.12, contour);
            //Vector2[] Line9 = { v11, v12 };
            //fun.drawBLine(dxf, Line9, 0.12, contour);
            //Vector2[] Line10 = { v14, v13 };
            //fun.drawBLine(dxf, Line10, 0.12, contour);
            //Vector2[] Line11 = { v14, v6 };
            //fun.drawBLine(dxf, Line11, 0.12, contour);
            //LwPolyline Arc4 = new LwPolyline();
            //Arc4.Vertexes.Add(new LwPolylineVertex(v12));
            //Arc4.Vertexes.Add(new LwPolylineVertex(v13));
            //Arc4.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 4.6;
            //fun.PolyFill(dxf, Arc4, 0.12, contour);
            //Vector2[] Line12 = { v15, v6 };
            //fun.drawBLine(dxf, Line12, 0.08, skdimensioning);
            //LwPolyline Arc5 = new LwPolyline();
            //Arc5.Vertexes.Add(new LwPolylineVertex(v14));
            //Arc5.Vertexes.Add(new LwPolylineVertex(v16));
            //Arc5.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 4.6;
            //fun.PolyFill(dxf, Arc5, 0.12, contour);
            //LwPolyline Arc6 = new LwPolyline();
            //Arc6.Vertexes.Add(new LwPolylineVertex(v18));
            //Arc6.Vertexes.Add(new LwPolylineVertex(v17));
            //Arc6.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 2.5;
            //fun.PolyFill(dxf, Arc6, 0.12, contour);
            //Vector2[] Line13 = { v18, v16 };
            //fun.drawBLine(dxf, Line13, 0.12, contour);
            //LwPolyline Arc7 = new LwPolyline();
            //Arc7.Vertexes.Add(new LwPolylineVertex(v18));
            //Arc7.Vertexes.Add(new LwPolylineVertex(v19));
            //Arc7.Vertexes[0].Bulge = -Math.Cos(epsr / 2) / 2.3;
            //fun.PolyFill(dxf, Arc7, 0.12, contour);
            //Vector2[] Line14 = { v20, v16 };
            //fun.drawBLine(dxf, Line14, 0.12, contour);
            //Vector2[] Line15 = { v20, v21 };
            //fun.drawBLine(dxf, Line15, 0.12, contour);
            //Vector2[] Line16 = { v19, v21 };
            //fun.drawBLine(dxf, Line16, 0.12, contour);
            //Vector2[] Line17 = { v22, v21 };
            //fun.drawBLine(dxf, Line17, 0.12, contour);
            //Vector2[] Line18 = { v22, v23 };
            //fun.drawBLine(dxf, Line18, 0.12, contour);
            //Vector2[] Line19 = { v24, v23 };
            //fun.drawBLine(dxf, Line19, 0.12, contour);
            //LwPolyline Arc8 = new LwPolyline();
            //Arc8.Vertexes.Add(new LwPolylineVertex(v24));
            //Arc8.Vertexes.Add(new LwPolylineVertex(v25));
            //Arc8.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 2.8;
            //fun.PolyFill(dxf, Arc8, 0.12, contour);
            //Vector2[] Line20 = { v27, v21 };
            //fun.drawBLine(dxf, Line20, 0.08, skdimensioning);
            //Vector2[] Line21 = { v28, v21 };
            //fun.drawBLine(dxf, Line21, 0.08, skdimensioning);
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v1.X + l1 / 8 + l, v1.Y + h / 1.8), new Vector2(v1.X - h / 8, v1.Y + h / 1.8) },0.25, centre, Linetype.Center);
            //
            //
            //DimensionStyle dimensionStyle = fun.CreateDimStyle();
            //dimensionStyle.ArrowSize = 1;
            //dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.TextHeight = 1.8;
            //double offset = 6;
            //LinearDimension dim1 = new LinearDimension(new Line(v1, v2), offset * 2, 90, dimensionStyle);
            //dim1.UserText = " 3 ";
            //dxf.AddEntity(dim1);
            //LinearDimension dim2 = new LinearDimension(new Line(v22, v2), offset * 4, 360, dimensionStyle);
            //dim2.UserText = " 60 ";
            //dxf.AddEntity(dim2);
            //LinearDimension dim3 = new LinearDimension(new Line(v22, v4), offset * 2.6, 360, dimensionStyle);
            //dim3.UserText = " 32 ";
            //dxf.AddEntity(dim3);
            //LinearDimension dim4 = new LinearDimension(new Line(v22, v26), offset * 1.6, 360, dimensionStyle);
            //dim4.UserText = " 17.4 ";
            //dxf.AddEntity(dim4);
            //LinearDimension dim5 = new LinearDimension(new Line(v23, v20), offset * 4, 270, dimensionStyle);
            //dim5.UserText = " Φ2.90 ";
            //dxf.AddEntity(dim5);
            //Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v21, v27), new Line(v21, v28), offset * 6, dimensionStyle);
            //angdim1.UserText = "140°";
            //dxf.AddEntity(angdim1);
            ////
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint34(Dictionary<string, Object> data)   //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 3;
            double pi = Math.PI;
            double epsr = 140 * pi / 180;
            double l = 60;
            double l1 = 32;
            double l2 = 17.4;
            double r = 1.45;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h);
            Vector2 v3 = new Vector2(v1.X + (l - l1), v1.Y);
            Vector2 v4 = new Vector2(v1.X + (l - l1), v2.Y);
            //
            Vector2 v5 = new Vector2(v3.X + (l1 - l2), v3.Y);
            Vector2 v6 = new Vector2(v4.X + (l1 - l2), v4.Y);
            //
            Vector2 v7 = new Vector2(v3.X + (l1 - l2) / 2, v3.Y);
            Vector2 v8 = new Vector2(v4.X + (l1 - l2) / 2, v4.Y);
            //
            Vector2 v9 = new Vector2(v5.X - (l1 - l2) / 6, v5.Y + (l1 - l2) / 8 * Math.Cos(epsr / 2));
            Vector2 v10 = new Vector2(v5.X, v9.Y + (l1 - l2) / 6 * Math.Cos(epsr / 2));
            //
            Vector2 v11 = new Vector2(v5.X + (l1 - l2) / 6, v5.Y + (l1 - l2) / 8 * Math.Cos(epsr / 2));
            Vector2 v12 = new Vector2(v11.X + (l1 - l2) / 12, v11.Y - (l1 - l2) / 12 * Math.Cos(epsr / 2));
            //
            Vector2 v13 = new Vector2(v11.X + (l1 - l2) / 5, v11.Y - (l1 - l2) / 6 * Math.Cos(epsr / 2));
            //
            Vector2 v14 = new Vector2(v13.X + l2 / 5, v13.Y);
            //
            Vector2 v15 = new Vector2(v6.X + l2, v6.Y);
            //
            Vector2 v16 = new Vector2(v14.X + l2 / 3.8, v14.Y + (l1 - l2) / 6 * Math.Cos(epsr / 2));
            Vector2 v17 = new Vector2(v6.X + (l1 - l2) / 3.8 * Math.Cos(epsr / 2), v6.Y - (l1 - l2) / 10 * Math.Cos(epsr / 2));
            Vector2 v18 = new Vector2(v17.X + l2 / 2.6, v17.Y + (l1 - l2) / 100 * Math.Cos(epsr / 2));
            //
            Vector2 v19 = new Vector2(v18.X + l2 / 4, v18.Y + (l1 - l2) / 100 * Math.Cos(epsr / 2));
            //
            Vector2 v20 = new Vector2(v16.X + l2 / 10, v1.Y);
            Vector2 v21 = new Vector2(v20.X, v20.Y + l2 / 10);
            //
            Vector2 v22 = new Vector2(v21.X + l2 / 50, v21.Y + l2 / 70);
            Vector2 v23 = new Vector2(v22.X - l2 / 50, v22.Y + l2 / 18 + l2 / 150);
            //
            Vector2 v24 = new Vector2(v23.X - l2 / 10, v23.Y - l2 / 100);
            Vector2 v25 = new Vector2(v24.X - l2 / 22, v24.Y - l2 / 50);
            //
            Vector2 v26 = new Vector2(v11.X - l2 / 20, v11.Y + l2 / 50);
            //
            Vector2 v27 = new Vector2(v21.X + l2 / 20, v21.Y + l2 / 20);
            Vector2 v28 = new Vector2(v21.X + l2 / 20, v21.Y - l2 / 20);
            //
            Vector2 v29 = new Vector2(v15.X, v15.Y - h);
            Vector2 v30 = new Vector2(v6.X, v6.Y - h);
            // 线段
            //主视图
            Vector2[] Line12 = { v15, v6 };
            fun.drawBLine(dxf, Line12, 0.25, skdimensioning);
            Vector2[] Line13 = { v15, v29 };
            fun.drawBLine(dxf, Line13, 0.25, skdimensioning);
            Vector2[] Line1 = { v30, v6 };
            fun.drawBLine(dxf, Line1, 0.25, skdimensioning);
            Vector2[] Line2 = { v30, v29 };
            fun.drawBLine(dxf, Line2, 0.25, skdimensioning);
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint35(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 3;
            double pi = Math.PI;
            double epsr = 140 * pi / 180;
            double l = 60;
            double l1 = 32;
            double l2 = 17.4;
            double r = 1.45;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h);
            Vector2 v3 = new Vector2(v1.X + (l - l1), v1.Y);
            Vector2 v4 = new Vector2(v1.X + (l - l1), v2.Y);
            //
            Vector2 v5 = new Vector2(v3.X + (l1 - l2), v3.Y);
            Vector2 v6 = new Vector2(v4.X + (l1 - l2), v4.Y);
            //
            Vector2 v7 = new Vector2(v3.X + (l1 - l2) / 2, v3.Y);
            Vector2 v8 = new Vector2(v4.X + (l1 - l2) / 2, v4.Y);
            //
            Vector2 v9 = new Vector2(v5.X - (l1 - l2) / 6, v5.Y + (l1 - l2) / 8 * Math.Cos(epsr / 2));
            Vector2 v10 = new Vector2(v5.X, v9.Y + (l1 - l2) / 6 * Math.Cos(epsr / 2));
            //
            Vector2 v11 = new Vector2(v5.X + (l1 - l2) / 6, v5.Y + (l1 - l2) / 8 * Math.Cos(epsr / 2));
            Vector2 v12 = new Vector2(v11.X + (l1 - l2) / 12, v11.Y - (l1 - l2) / 12 * Math.Cos(epsr / 2));
            //
            Vector2 v13 = new Vector2(v11.X + (l1 - l2) / 5, v11.Y - (l1 - l2) / 6 * Math.Cos(epsr / 2));
            //
            Vector2 v14 = new Vector2(v13.X + l2 / 5, v13.Y);
            //
            Vector2 v15 = new Vector2(v6.X + l2, v6.Y);
            //
            Vector2 v16 = new Vector2(v14.X + l2 / 3.8, v14.Y + (l1 - l2) / 6 * Math.Cos(epsr / 2));
            Vector2 v17 = new Vector2(v6.X + (l1 - l2) / 3.8 * Math.Cos(epsr / 2), v6.Y - (l1 - l2) / 10 * Math.Cos(epsr / 2));
            Vector2 v18 = new Vector2(v17.X + l2 / 2.6, v17.Y + (l1 - l2) / 100 * Math.Cos(epsr / 2));
            //
            Vector2 v19 = new Vector2(v18.X + l2 / 4, v18.Y + (l1 - l2) / 100 * Math.Cos(epsr / 2));
            //
            Vector2 v20 = new Vector2(v16.X + l2 / 10, v1.Y);
            Vector2 v21 = new Vector2(v20.X, v20.Y + l2 / 10);
            //
            Vector2 v22 = new Vector2(v21.X + l2 / 50, v21.Y + l2 / 70);
            Vector2 v23 = new Vector2(v22.X - l2 / 50, v22.Y + l2 / 18 + l2 / 150);
            //
            Vector2 v24 = new Vector2(v23.X - l2 / 10, v23.Y - l2 / 100);
            Vector2 v25 = new Vector2(v24.X - l2 / 22, v24.Y - l2 / 50);
            //
            Vector2 v26 = new Vector2(v11.X - l2 / 20, v11.Y + l2 / 50);
            //
            Vector2 v27 = new Vector2(v21.X + l2 / 20, v21.Y + l2 / 20);
            Vector2 v28 = new Vector2(v21.X + l2 / 20, v21.Y - l2 / 20);
            //
            Vector2 v29 = new Vector2(v15.X + h / 1.6, v15.Y - h);
            Vector2 v30 = new Vector2(v6.X, v6.Y - h);
            // 线段
            //主视图
            Vector2[] Line12 = { v15, v6 };
            fun.drawBLine(dxf, Line12, 0.25, skdimensioning);
            Vector2[] Line13 = { v15, v29 };
            fun.drawBLine(dxf, Line13, 0.25, skdimensioning);
            Vector2[] Line1 = { v30, v6 };
            fun.drawBLine(dxf, Line1, 0.25, skdimensioning);
            Vector2[] Line2 = { v30, v29 };
            fun.drawBLine(dxf, Line2, 0.25, skdimensioning);
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint36(Dictionary<string, Object> data)     //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 3;
            double pi = Math.PI;
            double epsr = 140 * pi / 180;
            double l = 60;
            double l1 = 32;
            double l2 = 17.4;
            double r = 1.45;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h);
            Vector2 v3 = new Vector2(v1.X + (l - l1), v1.Y);
            Vector2 v4 = new Vector2(v1.X + (l - l1), v2.Y);
            //
            Vector2 v5 = new Vector2(v3.X + (l1 - l2), v3.Y);
            Vector2 v6 = new Vector2(v4.X + (l1 - l2), v4.Y);
            //
            Vector2 v7 = new Vector2(v3.X + (l1 - l2) / 2, v3.Y);
            Vector2 v8 = new Vector2(v4.X + (l1 - l2) / 2, v4.Y);
            //
            Vector2 v9 = new Vector2(v5.X - (l1 - l2) / 6, v5.Y + (l1 - l2) / 8 * Math.Cos(epsr / 2));
            Vector2 v10 = new Vector2(v5.X, v9.Y + (l1 - l2) / 6 * Math.Cos(epsr / 2));
            //
            Vector2 v11 = new Vector2(v5.X + (l1 - l2) / 6, v5.Y + (l1 - l2) / 8 * Math.Cos(epsr / 2));
            Vector2 v12 = new Vector2(v11.X + (l1 - l2) / 12, v11.Y - (l1 - l2) / 12 * Math.Cos(epsr / 2));
            //
            Vector2 v13 = new Vector2(v11.X + (l1 - l2) / 5, v11.Y - (l1 - l2) / 6 * Math.Cos(epsr / 2));
            //
            Vector2 v14 = new Vector2(v13.X + l2 / 5, v13.Y);
            //
            Vector2 v15 = new Vector2(v6.X + l2, v6.Y);
            //
            Vector2 v16 = new Vector2(v14.X + l2 / 3.8, v14.Y + (l1 - l2) / 6 * Math.Cos(epsr / 2));
            Vector2 v17 = new Vector2(v6.X + (l1 - l2) / 3.8 * Math.Cos(epsr / 2), v6.Y - (l1 - l2) / 10 * Math.Cos(epsr / 2));
            Vector2 v18 = new Vector2(v17.X + l2 / 2.6, v17.Y + (l1 - l2) / 100 * Math.Cos(epsr / 2));
            //
            Vector2 v19 = new Vector2(v18.X + l2 / 4, v18.Y + (l1 - l2) / 100 * Math.Cos(epsr / 2));
            //
            Vector2 v20 = new Vector2(v16.X + l2 / 10, v1.Y);
            Vector2 v21 = new Vector2(v20.X, v20.Y + l2 / 10);
            //
            Vector2 v22 = new Vector2(v21.X + l2 / 50, v21.Y + l2 / 70);
            Vector2 v23 = new Vector2(v22.X - l2 / 50, v22.Y + l2 / 18 + l2 / 150);
            //
            Vector2 v24 = new Vector2(v23.X - l2 / 10, v23.Y - l2 / 100);
            Vector2 v25 = new Vector2(v24.X - l2 / 22, v24.Y - l2 / 50);
            //
            Vector2 v26 = new Vector2(v11.X - l2 / 20, v11.Y + l2 / 50);
            //
            Vector2 v27 = new Vector2(v21.X + l2 / 20, v21.Y + l2 / 20);
            Vector2 v28 = new Vector2(v21.X + l2 / 20, v21.Y - l2 / 20);
            // 线段
            //主视图
            Vector2[] Line1 = { v1, v2 };
            fun.drawBLine(dxf, Line1, 0.5, contour);
            Vector2[] Line2 = { v1, v3 };
            fun.drawBLine(dxf, Line2, 0.5, contour);
            Vector2[] Line3 = { v4, v2 };
            fun.drawBLine(dxf, Line3, 0.5, contour);
            //Vector2[] Line4 = { v3, v5 };
            //fun.drawBLine(dxf, Line4, 0.12, contour);
            //Vector2[] Line5 = { v6, v4 };
            //fun.drawBLine(dxf, Line5, 0.12, contour);
            //Vector2[] Line6 = { v8, v7 };
            //fun.drawBLine(dxf, Line6, 0.12, contour);
            //LwPolyline Arc1 = new LwPolyline();
            //Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            //Arc1.Vertexes.Add(new LwPolylineVertex(v9));
            //Arc1.Vertexes[0].Bulge = -Math.Cos(epsr / 2) / 2;
            //fun.PolyFill(dxf, Arc1, 0.12, contour);
            //LwPolyline Arc2 = new LwPolyline();
            //Arc2.Vertexes.Add(new LwPolylineVertex(v10));
            //Arc2.Vertexes.Add(new LwPolylineVertex(v9));
            //Arc2.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 2;
            //fun.PolyFill(dxf, Arc2, 0.12, contour);
            //Vector2[] Line7 = { v5, v10 };
            //fun.drawBLine(dxf, Line7, 0.12, contour);
            //LwPolyline Arc3 = new LwPolyline();
            //Arc3.Vertexes.Add(new LwPolylineVertex(v11));
            //Arc3.Vertexes.Add(new LwPolylineVertex(v5));
            //Arc3.Vertexes[0].Bulge = -Math.Cos(epsr / 2) / 2;
            //fun.PolyFill(dxf, Arc3, 0.12, contour);
            //Vector2[] Line8 = { v11, v10 };
            //fun.drawBLine(dxf, Line8, 0.12, contour);
            //Vector2[] Line9 = { v11, v12 };
            //fun.drawBLine(dxf, Line9, 0.12, contour);
            //Vector2[] Line10 = { v14, v13 };
            //fun.drawBLine(dxf, Line10, 0.12, contour);
            //Vector2[] Line11 = { v14, v6 };
            //fun.drawBLine(dxf, Line11, 0.12, contour);
            //LwPolyline Arc4 = new LwPolyline();
            //Arc4.Vertexes.Add(new LwPolylineVertex(v12));
            //Arc4.Vertexes.Add(new LwPolylineVertex(v13));
            //Arc4.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 4.6;
            //fun.PolyFill(dxf, Arc4, 0.12, contour);
            //Vector2[] Line12 = { v15, v6 };
            //fun.drawBLine(dxf, Line12, 0.08, skdimensioning);
            //LwPolyline Arc5 = new LwPolyline();
            //Arc5.Vertexes.Add(new LwPolylineVertex(v14));
            //Arc5.Vertexes.Add(new LwPolylineVertex(v16));
            //Arc5.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 4.6;
            //fun.PolyFill(dxf, Arc5, 0.12, contour);
            //LwPolyline Arc6 = new LwPolyline();
            //Arc6.Vertexes.Add(new LwPolylineVertex(v18));
            //Arc6.Vertexes.Add(new LwPolylineVertex(v17));
            //Arc6.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 2.5;
            //fun.PolyFill(dxf, Arc6, 0.12, contour);
            //Vector2[] Line13 = { v18, v16 };
            //fun.drawBLine(dxf, Line13, 0.12, contour);
            //LwPolyline Arc7 = new LwPolyline();
            //Arc7.Vertexes.Add(new LwPolylineVertex(v18));
            //Arc7.Vertexes.Add(new LwPolylineVertex(v19));
            //Arc7.Vertexes[0].Bulge = -Math.Cos(epsr / 2) / 2.3;
            //fun.PolyFill(dxf, Arc7, 0.12, contour);
            //Vector2[] Line14 = { v20, v16 };
            //fun.drawBLine(dxf, Line14, 0.12, contour);
            //Vector2[] Line15 = { v20, v21 };
            //fun.drawBLine(dxf, Line15, 0.12, contour);
            //Vector2[] Line16 = { v19, v21 };
            //fun.drawBLine(dxf, Line16, 0.12, contour);
            //Vector2[] Line17 = { v22, v21 };
            //fun.drawBLine(dxf, Line17, 0.12, contour);
            //Vector2[] Line18 = { v22, v23 };
            //fun.drawBLine(dxf, Line18, 0.12, contour);
            //Vector2[] Line19 = { v24, v23 };
            //fun.drawBLine(dxf, Line19, 0.12, contour);
            //LwPolyline Arc8 = new LwPolyline();
            //Arc8.Vertexes.Add(new LwPolylineVertex(v24));
            //Arc8.Vertexes.Add(new LwPolylineVertex(v25));
            //Arc8.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 2.8;
            //fun.PolyFill(dxf, Arc8, 0.12, contour);
            //Vector2[] Line20 = { v27, v21 };
            //fun.drawBLine(dxf, Line20, 0.08, skdimensioning);
            //Vector2[] Line21 = { v28, v21 };
            //fun.drawBLine(dxf, Line21, 0.08, skdimensioning);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v1.X + l1 / 8 + l, v1.Y + h / 1.8), new Vector2(v1.X - h / 8, v1.Y + h / 1.8) }, centre, Linetype.Center);
            ////
            ////
            //DimensionStyle dimensionStyle = fun.CreateDimStyle();
            //dimensionStyle.ArrowSize = 1;
            //dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.TextHeight = 1.8;
            //double offset = 6;
            //LinearDimension dim1 = new LinearDimension(new Line(v1, v2), offset * 2, 90, dimensionStyle);
            //dim1.UserText = " 3 ";
            //dxf.AddEntity(dim1);
            //LinearDimension dim2 = new LinearDimension(new Line(v22, v2), offset * 4, 360, dimensionStyle);
            //dim2.UserText = " 60 ";
            //dxf.AddEntity(dim2);
            //LinearDimension dim3 = new LinearDimension(new Line(v22, v4), offset * 2.6, 360, dimensionStyle);
            //dim3.UserText = " 32 ";
            //dxf.AddEntity(dim3);
            //LinearDimension dim4 = new LinearDimension(new Line(v22, v26), offset * 1.6, 360, dimensionStyle);
            //dim4.UserText = " 17.4 ";
            //dxf.AddEntity(dim4);
            //LinearDimension dim5 = new LinearDimension(new Line(v23, v20), offset * 4, 270, dimensionStyle);
            //dim5.UserText = " Φ2.90 ";
            //dxf.AddEntity(dim5);
            //Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v21, v27), new Line(v21, v28), offset * 6, dimensionStyle);
            //angdim1.UserText = "140°";
            //dxf.AddEntity(angdim1);
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint37(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 3;
            double pi = Math.PI;
            double epsr = 140 * pi / 180;
            double l = 60;
            double l1 = 32;
            double l2 = 17.4;
            double r = 1.45;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h);
            Vector2 v3 = new Vector2(v1.X + (l - l1), v1.Y);
            Vector2 v4 = new Vector2(v1.X + (l - l1), v2.Y);
            //
            Vector2 v5 = new Vector2(v3.X + (l1 - l2), v3.Y);
            Vector2 v6 = new Vector2(v4.X + (l1 - l2), v4.Y);
            //
            Vector2 v7 = new Vector2(v3.X + (l1 - l2) / 2, v3.Y);
            Vector2 v8 = new Vector2(v4.X + (l1 - l2) / 2, v4.Y);
            //
            Vector2 v9 = new Vector2(v5.X - (l1 - l2) / 6, v5.Y + (l1 - l2) / 8 * Math.Cos(epsr / 2));
            Vector2 v10 = new Vector2(v5.X, v9.Y + (l1 - l2) / 6 * Math.Cos(epsr / 2));
            //
            Vector2 v11 = new Vector2(v5.X + (l1 - l2) / 6, v5.Y + (l1 - l2) / 8 * Math.Cos(epsr / 2));
            Vector2 v12 = new Vector2(v11.X + (l1 - l2) / 12, v11.Y - (l1 - l2) / 12 * Math.Cos(epsr / 2));
            //
            Vector2 v13 = new Vector2(v11.X + (l1 - l2) / 5, v11.Y - (l1 - l2) / 6 * Math.Cos(epsr / 2));
            //
            Vector2 v14 = new Vector2(v13.X + l2 / 5, v13.Y);
            //
            Vector2 v15 = new Vector2(v6.X + l2, v6.Y);
            //
            Vector2 v16 = new Vector2(v14.X + l2 / 3.8, v14.Y + (l1 - l2) / 6 * Math.Cos(epsr / 2));
            Vector2 v17 = new Vector2(v6.X + (l1 - l2) / 3.8 * Math.Cos(epsr / 2), v6.Y - (l1 - l2) / 10 * Math.Cos(epsr / 2));
            Vector2 v18 = new Vector2(v17.X + l2 / 2.6, v17.Y + (l1 - l2) / 100 * Math.Cos(epsr / 2));
            //
            Vector2 v19 = new Vector2(v18.X + l2 / 4, v18.Y + (l1 - l2) / 100 * Math.Cos(epsr / 2));
            //
            Vector2 v20 = new Vector2(v16.X + l2 / 10, v1.Y);
            Vector2 v21 = new Vector2(v20.X, v20.Y + l2 / 10);
            //
            Vector2 v22 = new Vector2(v21.X + l2 / 50, v21.Y + l2 / 70);
            Vector2 v23 = new Vector2(v22.X - l2 / 50, v22.Y + l2 / 18 + l2 / 150);
            //
            Vector2 v24 = new Vector2(v23.X - l2 / 10, v23.Y - l2 / 100);
            Vector2 v25 = new Vector2(v24.X - l2 / 22, v24.Y - l2 / 50);
            //
            Vector2 v26 = new Vector2(v11.X - l2 / 20, v11.Y + l2 / 50);
            //
            Vector2 v27 = new Vector2(v21.X + l2 / 20, v21.Y + l2 / 20);
            Vector2 v28 = new Vector2(v21.X + l2 / 20, v21.Y - l2 / 20);
            // 线段
            //主视图
            //Vector2[] Line1 = { v1, v2 };
            //fun.drawBLine(dxf, Line1, 0.12, contour);
            //Vector2[] Line2 = { v1, v3 };
            //fun.drawBLine(dxf, Line2, 0.12, contour);
            //Vector2[] Line3 = { v4, v2 };
            //fun.drawBLine(dxf, Line3, 0.12, contour);
            //Vector2[] Line4 = { v3, v5 };
            //fun.drawBLine(dxf, Line4, 0.12, contour);
            //Vector2[] Line5 = { v6, v4 };
            //fun.drawBLine(dxf, Line5, 0.12, contour);
            //Vector2[] Line6 = { v8, v7 };
            //fun.drawBLine(dxf, Line6, 0.12, contour);
            //LwPolyline Arc1 = new LwPolyline();
            //Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            //Arc1.Vertexes.Add(new LwPolylineVertex(v9));
            //Arc1.Vertexes[0].Bulge = -Math.Cos(epsr / 2) / 2;
            //fun.PolyFill(dxf, Arc1, 0.12, contour);
            //LwPolyline Arc2 = new LwPolyline();
            //Arc2.Vertexes.Add(new LwPolylineVertex(v10));
            //Arc2.Vertexes.Add(new LwPolylineVertex(v9));
            //Arc2.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 2;
            //fun.PolyFill(dxf, Arc2, 0.12, contour);
            //Vector2[] Line7 = { v5, v10 };
            //fun.drawBLine(dxf, Line7, 0.12, contour);
            //LwPolyline Arc3 = new LwPolyline();
            //Arc3.Vertexes.Add(new LwPolylineVertex(v11));
            //Arc3.Vertexes.Add(new LwPolylineVertex(v5));
            //Arc3.Vertexes[0].Bulge = -Math.Cos(epsr / 2) / 2;
            //fun.PolyFill(dxf, Arc3, 0.12, contour);
            //Vector2[] Line8 = { v11, v10 };
            //fun.drawBLine(dxf, Line8, 0.12, contour);
            //Vector2[] Line9 = { v11, v12 };
            //fun.drawBLine(dxf, Line9, 0.12, contour);
            //Vector2[] Line10 = { v14, v13 };
            //fun.drawBLine(dxf, Line10, 0.12, contour);
            //Vector2[] Line11 = { v14, v6 };
            //fun.drawBLine(dxf, Line11, 0.12, contour);
            //LwPolyline Arc4 = new LwPolyline();
            //Arc4.Vertexes.Add(new LwPolylineVertex(v12));
            //Arc4.Vertexes.Add(new LwPolylineVertex(v13));
            //Arc4.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 4.6;
            //fun.PolyFill(dxf, Arc4, 0.12, contour);
            //Vector2[] Line12 = { v15, v6 };
            //fun.drawBLine(dxf, Line12, 0.08, skdimensioning);
            //LwPolyline Arc5 = new LwPolyline();
            //Arc5.Vertexes.Add(new LwPolylineVertex(v14));
            //Arc5.Vertexes.Add(new LwPolylineVertex(v16));
            //Arc5.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 4.6;
            //fun.PolyFill(dxf, Arc5, 0.12, contour);
            //LwPolyline Arc6 = new LwPolyline();
            //Arc6.Vertexes.Add(new LwPolylineVertex(v18));
            //Arc6.Vertexes.Add(new LwPolylineVertex(v17));
            //Arc6.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 2.5;
            //fun.PolyFill(dxf, Arc6, 0.12, contour);
            //Vector2[] Line13 = { v18, v16 };
            //fun.drawBLine(dxf, Line13, 0.12, contour);
            //LwPolyline Arc7 = new LwPolyline();
            //Arc7.Vertexes.Add(new LwPolylineVertex(v18));
            //Arc7.Vertexes.Add(new LwPolylineVertex(v19));
            //Arc7.Vertexes[0].Bulge = -Math.Cos(epsr / 2) / 2.3;
            //fun.PolyFill(dxf, Arc7, 0.12, contour);
            //Vector2[] Line14 = { v20, v16 };
            //fun.drawBLine(dxf, Line14, 0.12, contour);
            //Vector2[] Line15 = { v20, v21 };
            //fun.drawBLine(dxf, Line15, 0.12, contour);
            //Vector2[] Line16 = { v19, v21 };
            //fun.drawBLine(dxf, Line16, 0.12, contour);
            //Vector2[] Line17 = { v22, v21 };
            //fun.drawBLine(dxf, Line17, 0.12, contour);
            //Vector2[] Line18 = { v22, v23 };
            //fun.drawBLine(dxf, Line18, 0.12, contour);
            //Vector2[] Line19 = { v24, v23 };
            //fun.drawBLine(dxf, Line19, 0.12, contour);
            //LwPolyline Arc8 = new LwPolyline();
            //Arc8.Vertexes.Add(new LwPolylineVertex(v24));
            //Arc8.Vertexes.Add(new LwPolylineVertex(v25));
            //Arc8.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 2.8;
            //fun.PolyFill(dxf, Arc8, 0.12, contour);
            //Vector2[] Line20 = { v27, v21 };
            //fun.drawBLine(dxf, Line20, 0.08, skdimensioning);
            //Vector2[] Line21 = { v28, v21 };
            //fun.drawBLine(dxf, Line21, 0.08, skdimensioning);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v1.X + l1 / 8 + l, v1.Y + h / 1.8), new Vector2(v1.X - h / 8, v1.Y + h / 1.8) }, centre, Linetype.Center);
            //
            //
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 1;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 1.8;
            double offset = 6;
            LinearDimension dim1 = new LinearDimension(new Line(v1, v2), offset * 2, 90, dimensionStyle);
            dim1.UserText = " 3 ";
            dxf.AddEntity(dim1);
            LinearDimension dim2 = new LinearDimension(new Line(v22, v2), offset * 4, 360, dimensionStyle);
            dim2.UserText = " 60 ";
            dxf.AddEntity(dim2);
            //LinearDimension dim3 = new LinearDimension(new Line(v22, v4), offset * 2.6, 360, dimensionStyle);
            //dim3.UserText = " 32 ";
            //dxf.AddEntity(dim3);
            //LinearDimension dim4 = new LinearDimension(new Line(v22, v26), offset * 1.6, 360, dimensionStyle);
            //dim4.UserText = " 17.4 ";
            //dxf.AddEntity(dim4);
            //LinearDimension dim5 = new LinearDimension(new Line(v23, v20), offset * 4, 270, dimensionStyle);
            //dim5.UserText = " Φ2.90 ";
            //dxf.AddEntity(dim5);
            //Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v21, v27), new Line(v21, v28), offset * 6, dimensionStyle);
            //angdim1.UserText = "140°";
            //dxf.AddEntity(angdim1);
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint38(Dictionary<string, Object> data)     //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 3;
            double pi = Math.PI;
            double epsr = 140 * pi / 180;
            double l = 60;
            double l1 = 32;
            double l2 = 17.4;
            double r = 1.45;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h);
            Vector2 v3 = new Vector2(v1.X + (l - l1), v1.Y);
            Vector2 v4 = new Vector2(v1.X + (l - l1), v2.Y);
            //
            Vector2 v5 = new Vector2(v3.X + (l1 - l2), v3.Y);
            Vector2 v6 = new Vector2(v4.X + (l1 - l2), v4.Y);
            //
            Vector2 v7 = new Vector2(v3.X + (l1 - l2) / 2, v3.Y);
            Vector2 v8 = new Vector2(v4.X + (l1 - l2) / 2, v4.Y);
            //
            Vector2 v9 = new Vector2(v5.X - (l1 - l2) / 6, v5.Y + (l1 - l2) / 8 * Math.Cos(epsr / 2));
            Vector2 v10 = new Vector2(v5.X, v9.Y + (l1 - l2) / 6 * Math.Cos(epsr / 2));
            //
            Vector2 v11 = new Vector2(v5.X + (l1 - l2) / 6, v5.Y + (l1 - l2) / 8 * Math.Cos(epsr / 2));
            Vector2 v12 = new Vector2(v11.X + (l1 - l2) / 12, v11.Y - (l1 - l2) / 12 * Math.Cos(epsr / 2));
            //
            Vector2 v13 = new Vector2(v11.X + (l1 - l2) / 5, v11.Y - (l1 - l2) / 6 * Math.Cos(epsr / 2));
            //
            Vector2 v14 = new Vector2(v13.X + l2 / 5, v13.Y);
            //
            Vector2 v15 = new Vector2(v6.X + l2, v6.Y);
            //
            Vector2 v16 = new Vector2(v14.X + l2 / 3.8, v14.Y + (l1 - l2) / 6 * Math.Cos(epsr / 2));
            Vector2 v17 = new Vector2(v6.X + (l1 - l2) / 3.8 * Math.Cos(epsr / 2), v6.Y - (l1 - l2) / 10 * Math.Cos(epsr / 2));
            Vector2 v18 = new Vector2(v17.X + l2 / 2.6, v17.Y + (l1 - l2) / 100 * Math.Cos(epsr / 2));
            //
            Vector2 v19 = new Vector2(v18.X + l2 / 4, v18.Y + (l1 - l2) / 100 * Math.Cos(epsr / 2));
            //
            Vector2 v20 = new Vector2(v16.X + l2 / 10, v1.Y);
            Vector2 v21 = new Vector2(v20.X, v20.Y + l2 / 10);
            //
            Vector2 v22 = new Vector2(v21.X + l2 / 50, v21.Y + l2 / 70);
            Vector2 v23 = new Vector2(v22.X - l2 / 50, v22.Y + l2 / 18 + l2 / 150);
            //
            Vector2 v24 = new Vector2(v23.X - l2 / 10, v23.Y - l2 / 100);
            Vector2 v25 = new Vector2(v24.X - l2 / 22, v24.Y - l2 / 50);
            //
            Vector2 v26 = new Vector2(v11.X - l2 / 20, v11.Y + l2 / 50);
            //
            Vector2 v27 = new Vector2(v21.X + l2 / 20, v21.Y + l2 / 20);
            Vector2 v28 = new Vector2(v21.X + l2 / 20, v21.Y - l2 / 20);
            // 线段
            //主视图
            //Vector2[] Line1 = { v1, v2 };
            //fun.drawBLine(dxf, Line1, 0.12, contour);
            //Vector2[] Line2 = { v1, v3 };
            //fun.drawBLine(dxf, Line2, 0.12, contour);
            //Vector2[] Line3 = { v4, v2 };
            //fun.drawBLine(dxf, Line3, 0.12, contour);
            //Vector2[] Line4 = { v3, v5 };
            //fun.drawBLine(dxf, Line4, 0.12, contour);
            //Vector2[] Line5 = { v6, v4 };
            //fun.drawBLine(dxf, Line5, 0.12, contour);
            //Vector2[] Line6 = { v8, v7 };
            //fun.drawBLine(dxf, Line6, 0.12, contour);
            //LwPolyline Arc1 = new LwPolyline();
            //Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            //Arc1.Vertexes.Add(new LwPolylineVertex(v9));
            //Arc1.Vertexes[0].Bulge = -Math.Cos(epsr / 2) / 2;
            //fun.PolyFill(dxf, Arc1, 0.12, contour);
            //LwPolyline Arc2 = new LwPolyline();
            //Arc2.Vertexes.Add(new LwPolylineVertex(v10));
            //Arc2.Vertexes.Add(new LwPolylineVertex(v9));
            //Arc2.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 2;
            //fun.PolyFill(dxf, Arc2, 0.12, contour);
            //Vector2[] Line7 = { v5, v10 };
            //fun.drawBLine(dxf, Line7, 0.12, contour);
            //LwPolyline Arc3 = new LwPolyline();
            //Arc3.Vertexes.Add(new LwPolylineVertex(v11));
            //Arc3.Vertexes.Add(new LwPolylineVertex(v5));
            //Arc3.Vertexes[0].Bulge = -Math.Cos(epsr / 2) / 2;
            //fun.PolyFill(dxf, Arc3, 0.12, contour);
            //Vector2[] Line8 = { v11, v10 };
            //fun.drawBLine(dxf, Line8, 0.12, contour);
            //Vector2[] Line9 = { v11, v12 };
            //fun.drawBLine(dxf, Line9, 0.12, contour);
            //Vector2[] Line10 = { v14, v13 };
            //fun.drawBLine(dxf, Line10, 0.12, contour);
            //Vector2[] Line11 = { v14, v6 };
            //fun.drawBLine(dxf, Line11, 0.12, contour);
            //LwPolyline Arc4 = new LwPolyline();
            //Arc4.Vertexes.Add(new LwPolylineVertex(v12));
            //Arc4.Vertexes.Add(new LwPolylineVertex(v13));
            //Arc4.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 4.6;
            //fun.PolyFill(dxf, Arc4, 0.12, contour);
            //Vector2[] Line12 = { v15, v6 };
            //fun.drawBLine(dxf, Line12, 0.08, skdimensioning);
            //LwPolyline Arc5 = new LwPolyline();
            //Arc5.Vertexes.Add(new LwPolylineVertex(v14));
            //Arc5.Vertexes.Add(new LwPolylineVertex(v16));
            //Arc5.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 4.6;
            //fun.PolyFill(dxf, Arc5, 0.12, contour);
            //LwPolyline Arc6 = new LwPolyline();
            //Arc6.Vertexes.Add(new LwPolylineVertex(v18));
            //Arc6.Vertexes.Add(new LwPolylineVertex(v17));
            //Arc6.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 2.5;
            //fun.PolyFill(dxf, Arc6, 0.12, contour);
            //Vector2[] Line13 = { v18, v16 };
            //fun.drawBLine(dxf, Line13, 0.12, contour);
            //LwPolyline Arc7 = new LwPolyline();
            //Arc7.Vertexes.Add(new LwPolylineVertex(v18));
            //Arc7.Vertexes.Add(new LwPolylineVertex(v19));
            //Arc7.Vertexes[0].Bulge = -Math.Cos(epsr / 2) / 2.3;
            //fun.PolyFill(dxf, Arc7, 0.12, contour);
            //Vector2[] Line14 = { v20, v16 };
            //fun.drawBLine(dxf, Line14, 0.12, contour);
            //Vector2[] Line15 = { v20, v21 };
            //fun.drawBLine(dxf, Line15, 0.12, contour);
            //Vector2[] Line16 = { v19, v21 };
            //fun.drawBLine(dxf, Line16, 0.12, contour);
            //Vector2[] Line17 = { v22, v21 };
            //fun.drawBLine(dxf, Line17, 0.12, contour);
            //Vector2[] Line18 = { v22, v23 };
            //fun.drawBLine(dxf, Line18, 0.12, contour);
            //Vector2[] Line19 = { v24, v23 };
            //fun.drawBLine(dxf, Line19, 0.12, contour);
            //LwPolyline Arc8 = new LwPolyline();
            //Arc8.Vertexes.Add(new LwPolylineVertex(v24));
            //Arc8.Vertexes.Add(new LwPolylineVertex(v25));
            //Arc8.Vertexes[0].Bulge = Math.Cos(epsr / 2) / 2.8;
            //fun.PolyFill(dxf, Arc8, 0.12, contour);
            //Vector2[] Line20 = { v27, v21 };
            //fun.drawBLine(dxf, Line20, 0.08, skdimensioning);
            //Vector2[] Line21 = { v28, v21 };
            //fun.drawBLine(dxf, Line21, 0.08, skdimensioning);
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v1.X + l1 / 8 + l, v1.Y + h / 1.8), new Vector2(v1.X - h / 8, v1.Y + h / 1.8) },0.25, centre, Linetype.Center);
            //
            //
            //DimensionStyle dimensionStyle = fun.CreateDimStyle();
            //dimensionStyle.ArrowSize = 1;
            //dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.TextHeight = 1.8;
            //double offset = 6;
            //LinearDimension dim1 = new LinearDimension(new Line(v1, v2), offset * 2, 90, dimensionStyle);
            //dim1.UserText = " 3 ";
            //dxf.AddEntity(dim1);
            //LinearDimension dim2 = new LinearDimension(new Line(v22, v2), offset * 4, 360, dimensionStyle);
            //dim2.UserText = " 60 ";
            //dxf.AddEntity(dim2);
            //LinearDimension dim3 = new LinearDimension(new Line(v22, v4), offset * 2.6, 360, dimensionStyle);
            //dim3.UserText = " 32 ";
            //dxf.AddEntity(dim3);
            //LinearDimension dim4 = new LinearDimension(new Line(v22, v26), offset * 1.6, 360, dimensionStyle);
            //dim4.UserText = " 17.4 ";
            //dxf.AddEntity(dim4);
            //LinearDimension dim5 = new LinearDimension(new Line(v23, v20), offset * 4, 270, dimensionStyle);
            //dim5.UserText = " Φ2.90 ";
            //dxf.AddEntity(dim5);
            //Angular2LineDimension angdim1 = new Angular2LineDimension(new Line(v21, v27), new Line(v21, v28), offset * 6, dimensionStyle);
            //angdim1.UserText = "140°";
            //dxf.AddEntity(angdim1);
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }

        //
        //A.6
        public static void Matingpoint40(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 25;
            double pi = Math.PI;
            double epsr = 140 * pi / 180;
            double h1 = 32;
            double h3 = 21;
            double l1 = 56;
            double l2 = 125;
            double l3 = 105;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h / 4);
            Vector2 v3 = new Vector2(v1.X, v1.Y - h / 4);
            //
            Vector2 v4 = new Vector2(v2.X, v2.Y + h / 4);
            Vector2 v5 = new Vector2(v3.X, v3.Y - h / 4);
            //
            Vector2 v6 = new Vector2(v4.X + h / 10, v4.Y + h / 8);
            Vector2 v7 = new Vector2(v5.X + h / 10, v5.Y - h / 8);
            //
            Vector2 v8 = new Vector2(v6.X, v6.Y - h / 3);
            Vector2 v9 = new Vector2(v1.X, v8.Y - h / 10);
            //
            Vector2 v10 = new Vector2(v7.X, v7.Y + h / 3);
            Vector2 v11 = new Vector2(v1.X, v10.Y + h / 10);
            //
            Vector2 v12 = new Vector2(v6.X + l1 - h / 10, v6.Y);
            Vector2 v13 = new Vector2(v7.X + l1 - h / 10, v7.Y);
            //
            Vector2 v14 = new Vector2(v8.X + l1 - h / 2.6, v8.Y);
            Vector2 v15 = new Vector2(v10.X + l1 - h / 2.6, v10.Y);
            //
            Vector2 v16 = new Vector2(v8.X + h / 16, v8.Y);
            Vector2 v17 = new Vector2(v10.X + h / 16, v10.Y);
            Vector2 v18 = new Vector2(v17.X + (l1 - h / 2.6) / 2, v17.Y);
            Vector2 v19 = new Vector2(v16.X + (l1 - h / 2.6) / 2, v16.Y);
            Vector2 v20 = new Vector2(v18.X + h / 10, v1.Y);
            Vector2 v21 = new Vector2(v19.X + h / 10, v1.Y);
            //
            Vector2 v22 = new Vector2(v14.X + h / 22, v14.Y - h / 18);
            Vector2 v23 = new Vector2(v15.X + h / 22, v15.Y + h / 18);
            //
            Vector2 v24 = new Vector2(v14.X + (l1 - h / 10) - (l1 - h / 2.6) + h / 16, v14.Y);
            Vector2 v25 = new Vector2(v15.X + (l1 - h / 10) - (l1 - h / 2.6) + h / 16, v15.Y);
            Vector2 v26 = new Vector2(v24.X, v24.Y - h / 12);
            Vector2 v27 = new Vector2(v19.X + h / 30, v19.Y - h / 12);
            //
            Vector2 v28 = new Vector2(v18.X + h / 30, v18.Y + h / 12);
            Vector2 v29 = new Vector2(v25.X, v25.Y + h / 12);
            //
            Vector2 v30 = new Vector2(v1.X, v16.Y + h / 8);
            Vector2 v31 = new Vector2(v1.X, v17.Y - h / 8);
            //第二阶段
            Vector2 v32 = new Vector2(v12.X, v12.Y + (h1 - h));
            Vector2 v33 = new Vector2(v13.X, v13.Y - (h1 - h));
            //圆弧里得斜坡(上）
            Vector2 v34 = new Vector2(v19.X + h + h / 6.8 + h / 30, v19.Y - h / 26);
            Vector2 v35 = new Vector2(v19.X + h + h / 6.8, v27.Y);
            //
            Vector2 v36 = new Vector2(v34.X, v34.Y + h / 16);
            //
            Vector2 v37 = new Vector2(v19.X + h + h / 6.8 + h / 30, v25.Y + h / 26);
            Vector2 v38 = new Vector2(v19.X + h + h / 6.8, v29.Y);
            //
            Vector2 v39 = new Vector2(v37.X, v33.Y - h / 26);
            //
            Vector2 v40 = new Vector2(v29.X, v23.Y + h + h / 22);
            Vector2 v41 = new Vector2(v29.X, v25.Y - h / 20);
            //
            Vector2 v42 = new Vector2(v39.X + (l2 - l3) / 2, v39.Y);
            //
            Vector2 v43 = new Vector2(v42.X, v37.Y);
            //
            Vector2 v44 = new Vector2(v41.X + ((l2 - l3) / 2) * 2.3 / 3, v41.Y);
            Vector2 v45 = new Vector2(v44.X, v25.Y);
            Vector2 v46 = new Vector2(v45.X - h / 36, v37.Y);
            Vector2 v47 = new Vector2(v45.X, v37.Y);
            Vector2 v48 = new Vector2(v42.X, v25.Y);
            //
            Vector2 v49 = new Vector2(v41.X + (((l2 - l3) / 2) * 2.3 / 3) / 2, v41.Y - h / 16);
            Vector2 v50 = new Vector2(v44.X - (((l2 - l3) / 2) * 2.3 / 3) / 2, v44.Y - h / 16);
            //
            Vector2 v51 = new Vector2(v46.X + h / 36, v46.Y + h / 26);
            Vector2 v52 = new Vector2(v42.X, v51.Y);
            //
            Vector2 v53 = new Vector2(v32.X + (l2 - l3) / 2, v32.Y);
            Vector2 v54 = new Vector2(v53.X, v12.Y - h / 3.6);
            Vector2 v55 = new Vector2(v54.X - h / 2.707, v54.Y);
            Vector2 v56 = new Vector2(v55.X, v55.Y - h / 32);
            //
            Vector2 v57 = new Vector2(v32.X + (l2 - l3) / 6, v32.Y);
            Vector2 v58 = new Vector2(v57.X, v57.Y - h / 6);
            Vector2 v59 = new Vector2(v32.X + (l2 - l3) / 2.6, v32.Y);
            Vector2 v60 = new Vector2(v59.X, v57.Y - h / 6);
            Vector2 v61 = new Vector2(v49.X, v60.Y - h / 20);
            //
            Vector2 v62 = new Vector2(v54.X - h / 12, v54.Y);
            Vector2 v63 = new Vector2(v62.X - h / 20, v62.Y - h / 10.5);
            //
            Vector2 v64 = new Vector2(v62.X + h / 8, v62.Y - h / 20);
            Vector2 v65 = new Vector2(v54.X, v54.Y - h / 36);
            //
            Vector2 v66 = new Vector2(v51.X, v51.Y + h / 2.4);
            //
            Vector2 v67 = new Vector2(v66.X, v66.Y - (h / 2.4) / 2.3);
            //
            Vector2 v68 = new Vector2(v64.X + ((l2 - l3) / 2) * 2 / 3, v64.Y);
            Vector2 v69 = new Vector2(v68.X, v68.Y + (h1 - h));
            Vector2 v70 = new Vector2(v68.X + ((l2 - l3) / 2) * 1 / 3, v68.Y);
            //
            Vector2 v71 = new Vector2(v66.X, v66.Y + h / 8.3);
            //
            Vector2 v72 = new Vector2(v66.X - h / 26, v66.Y - (h / 2.4) / 3.2);
            Vector2 v73 = new Vector2(v48.X, v48.Y + h / 24);
            //
            Vector2 v74 = new Vector2(v73.X + (((l2 - l3) / 2) * 2.3 / 3.3) / 1.8, v73.Y - (((l2 - l3) / 2) * 2.3 / 3) / 2.6);
            //上半
            Vector2 v75 = new Vector2(v53.X + h / 36, v53.Y);
            Vector2 v76 = new Vector2(v75.X + ((l2 - l3) / 2) * 2.8 / 3.2, v75.Y - ((l2 - l3) / 2) * 2.6 / 3.6);
            Vector2 v77 = new Vector2(v76.X, v76.Y - h / 7);
            Vector2 v78 = new Vector2(v76.X + h / 8, v76.Y - h / 30);
            //
            Vector2 v79 = new Vector2(v78.X + l3 / 3, v78.Y);
            Vector2 v80 = new Vector2(v78.X, v78.Y - h / 3.2);
            //
            Vector2 v81 = new Vector2(v42.X + ((l2 - l3) / 2) * 2.8 / 3.2, v42.Y + ((l2 - l3) / 2) * 2.6 / 3.6);
            Vector2 v82 = new Vector2(v81.X + h / 8, v81.Y + h / 30);
            Vector2 v83 = new Vector2(v82.X + l3 / 3, v82.Y);
            Vector2 v84 = new Vector2(v81.X, v81.Y + h / 4);
            Vector2 v85 = new Vector2(v82.X, v82.Y + h / 4.7);
            //中间
            Vector2 v86 = new Vector2(v67.X + h / 4, v67.Y - h / 4);
            Vector2 v87 = new Vector2(v86.X, v86.Y - h / 6.3);
            Vector2 v88 = new Vector2(v86.X + h / 12, v86.Y - h / 16);
            Vector2 v89 = new Vector2(v88.X + h / 20, v88.Y + h / 2.1);
            Vector2 v90 = new Vector2(v89.X - h / 36, v89.Y);
            Vector2 v91 = new Vector2(v90.X, v90.Y + h / 8);
            Vector2 v92 = new Vector2(v90.X - h / 10, v90.Y + h / 9);
            Vector2 v93 = new Vector2(v89.X + h / 36, v89.Y + h / 9);
            //
            Vector2 v94 = new Vector2(v90.X - h / 5, v90.Y - h / 3.1);
            Vector2 v95 = new Vector2(v90.X - h / 3, v90.Y);
            //下边
            Vector2 v96 = new Vector2(v85.X + l3 * 2 / 3, v85.Y - h / 36);
            Vector2 v97 = new Vector2(v88.X + l3 * 2 / 2.9, v85.Y);
            //
            Vector2 v98 = new Vector2(v90.X + l3 / 4.6, v90.Y - h / 10);
            //
            Vector2 v99 = new Vector2(v96.X + l3 / 3 - l3 / 8, v96.Y - h / 6);
            Vector2 v100 = new Vector2(v99.X + l3 / 8, v99.Y);
            //
            Vector2 v101 = new Vector2(v79.X + l3 * 2 / 3, v79.Y + h / 80);
            Vector2 v102 = new Vector2(v101.X - l2 / 9, v1.Y + h / 6);
            Vector2 v103 = new Vector2(v102.X + h / 6, v102.Y + h / 8);
            Vector2 v104 = new Vector2(v103.X - h / 26, v101.Y);
            Vector2 v105 = new Vector2(v101.X - l2 / 3.2, v1.Y + h / 2.15);
            Vector2 v106 = new Vector2(v103.X - h / 1.9, v103.Y);
            Vector2 v107 = new Vector2(v102.X, v102.Y + h / 8);
            //
            Vector2 v108 = new Vector2(v101.X + h / 22, v101.Y - h / 3.2);
            Vector2 v109 = new Vector2(v108.X - h / 3, v108.Y - h / 30);
            Vector2 v110 = new Vector2(v109.X - h / 24, v101.Y);
            //下底右边
            Vector2 v111 = new Vector2(v108.X - h / 23, v108.Y - h / 200);
            Vector2 v112 = new Vector2(v111.X, v111.Y - h3 - h / 28);
            //上侧斜边
            Vector2 v113 = new Vector2(v110.X + h / 3.07, v110.Y + h / 40);
            //
            Vector2 v114 = new Vector2(v111.X - (h / 23) * 1.3, v111.Y - (h / 200) * 1.3);
            Vector2 v115 = new Vector2(v114.X, v114.Y - h3 / 1.2);
            //
            Vector2 v116 = new Vector2(v101.X + h / 40, v115.Y + h / 5.6);
            Vector2 v117 = new Vector2(v108.X - h / 3.1, v116.Y - h / 30);
            Vector2 v118 = new Vector2(v109.X - h / 40, v117.Y + h / 3.5);
            Vector2 v119 = new Vector2(v110.X + h / 3.1, v118.Y + h / 40);
            //虚线段
            Vector2 v120 = new Vector2(v1.X + l1, v1.Y);
            Vector2 v121 = new Vector2(v120.X + l2 + h / 3, v120.Y);
            //*/
            Vector2 v122 = new Vector2(v120.X + l2 / 1.2, v120.Y);
            Vector2 v123 = new Vector2(v120.X + l2 / 1.6, v120.Y);
            Vector2 v124 = new Vector2(v52.X, v37.Y);
            Vector2 v125 = new Vector2(v120.X + l2 / 1.4, v120.Y);
            //
            Vector2 v126 = new Vector2(v89.X - h / 36, v89.Y + h / 20);
            Vector2 v127 = new Vector2(v123.X + h * 1.59, v123.Y + h / 3.7);
            //
            Vector2 v128 = new Vector2(v127.X + h / 9, v123.Y + h / 4);
            Vector2 v129 = new Vector2(v128.X + h / 3.5, v128.Y - h / 10);
            //
            Vector2 v130 = new Vector2(v123.X + h * 1.3, v1.Y - h / 5);
            Vector2 v131 = new Vector2(v123.X + h * 1.3, v1.Y - h / 7);
            Vector2 v132 = new Vector2(v123.X + h * 1.3, v1.Y - h / 20);
            //
            Vector2 v133 = new Vector2(v130.X + h / 1.44, v130.Y + h / 16);
            Vector2 v134 = new Vector2(v131.X + h / 1.46, v131.Y + h / 16);
            Vector2 v135 = new Vector2(v132.X + h / 1.46, v132.Y + h / 16);
            //线段
            //主视图
            Vector2[] Line1 = { v1, v2 };
            fun.drawBLine(dxf, Line1, 0.5, contour);
            Vector2[] Line2 = { v1, v3 };
            fun.drawBLine(dxf, Line2, 0.5, contour);
            Vector2[] Line3 = { v2, v4 };
            fun.drawBLine(dxf, Line3, 0.5, contour);
            Vector2[] Line4 = { v3, v5 };
            fun.drawBLine(dxf, Line4, 0.5, contour);
            Vector2[] Line5 = { v4, v6 };
            fun.drawBLine(dxf, Line5, 0.5, contour);
            Vector2[] Line6 = { v5, v7 };
            fun.drawBLine(dxf, Line6, 0.5, contour);
            Vector2[] Line7 = { v6, v8 };
            fun.drawBLine(dxf, Line7, 0.5, contour);
            //
            Vector2[] Line8 = { v9, v8 };
            fun.drawBLine(dxf, Line8, 0.5, contour);
            //
            Vector2[] Line9 = { v7, v10 };
            fun.drawBLine(dxf, Line9, 0.5, contour);
            Vector2[] Line10 = { v11, v10 };
            fun.drawBLine(dxf, Line10, 0.5, contour);
            //
            Vector2[] Line11 = { v12, v6 };
            fun.drawBLine(dxf, Line11, 0.5, contour);
            Vector2[] Line12 = { v13, v7 };
            fun.drawBLine(dxf, Line12, 0.5, contour);
            Vector2[] Line13 = { v13, v12 };
            fun.drawBLine(dxf, Line13, 0.5, contour);
            //
            Vector2[] Line14 = { v14, v8 };
            fun.drawBLine(dxf, Line14, 0.5, contour);
            Vector2[] Line15 = { v14, v15 };
            fun.drawBLine(dxf, Line15, 0.5, contour);
            Vector2[] Line16 = { v15, v10 };
            fun.drawBLine(dxf, Line16, 0.5, contour);
            //
            Vector2[] Line17 = { v17, v16 };
            fun.drawPlinetype(dxf, Line17, 0.35,refin, Linetype.Dashed);
            Vector2[] Line18 = { v17, v18 };
            fun.drawPlinetype(dxf, Line18, 0.35,refin, Linetype.Dashed);
            Vector2[] Line19 = { v16, v19 };
            fun.drawPlinetype(dxf, Line19, 0.35,refin, Linetype.Dashed);
            Vector2[] Line20 = { v18, v19 };
            fun.drawPlinetype(dxf, Line20, 0.35,refin, Linetype.Dashed);
            Vector2[] Line21 = { v18, v20 };
            fun.drawPlinetype(dxf, Line21, 0.35,refin, Linetype.Dashed);
            Vector2[] Line22 = { v19, v21 };
            fun.drawPlinetype(dxf, Line22, 0.35,refin, Linetype.Dashed);
            //
            Vector2[] Line23 = { v14, v22 };
            fun.drawBLine(dxf, Line23, 0.5, contour);
            Vector2[] Line24 = { v15, v23 };
            fun.drawBLine(dxf, Line24, 0.5, contour);
            Vector2[] Line25 = { v22, v23 };
            fun.drawBLine(dxf, Line25, 0.5, contour);
            Vector2[] Line26 = { v14, v24 };
            fun.drawPlinetype(dxf, Line26,0.35, refin, Linetype.Dashed);
            Vector2[] Line27 = { v15, v25 };
            fun.drawPlinetype(dxf, Line27, 0.35,refin, Linetype.Dashed);
            Vector2[] Line28 = { v26, v27 };
            fun.drawPlinetype(dxf, Line28, 0.35,refin, Linetype.Dashed);
            Vector2[] Line29 = { v28, v29 };
            fun.drawPlinetype(dxf, Line29, 0.35,refin, Linetype.Dashed);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v24));
            Arc1.Vertexes.Add(new LwPolylineVertex(v26));
            Arc1.Vertexes[0].Bulge = -h / 36;
            fun.PolyFill(dxf, Arc1, 0.35, refin);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v25));
            Arc2.Vertexes.Add(new LwPolylineVertex(v29));
            Arc2.Vertexes[0].Bulge = h / 36;
            fun.PolyFill(dxf, Arc2, 0.35, refin);
            Vector2[] Line30 = { v16, v30 };
            fun.drawBLine(dxf, Line30, 0.35, refin);
            Vector2[] Line31 = { v17, v31 };
            fun.drawBLine(dxf, Line31, 0.35, refin);
            //
            Vector2[] Line32 = { v32, v12 };
            fun.drawBLine(dxf, Line32, 0.5, contour);
            Vector2[] Line33 = { v33, v13 };
            fun.drawBLine(dxf, Line33, 0.5, contour);
            Vector2[] Line34 = { v34, v35 };
            fun.drawBLine(dxf, Line34, 0.5, contour);
            Vector2[] Line35 = { v34, v36 };
            fun.drawBLine(dxf, Line35, 0.5, contour);
            Vector2[] Line36 = { v37, v38 };
            fun.drawBLine(dxf, Line36, 0.5, contour);
            Vector2[] Line37 = { v39, v37 };
            fun.drawBLine(dxf, Line37, 0.5, contour);
            Vector2[] Line38 = { v39, v33 };
            fun.drawBLine(dxf, Line38, 0.5, contour);
            Vector2[] Line39 = { v26, v29 };
            fun.drawPlinetype(dxf, Line39,0.35, refin, Linetype.Dashed);
            Vector2[] Line40 = { v24, v40 };
            fun.drawPlinetype(dxf, Line40, 0.35,refin, Linetype.Dashed);
            Vector2[] Line41 = { v32, v40 };
            fun.drawPlinetype(dxf, Line41, 0.35,refin, Linetype.Dashed);
            Vector2[] Line42 = { v25, v41 };
            fun.drawBLine(dxf, Line42, 0.25, skdimensioning);
            Vector2[] Line43 = { v42, v39 };
            fun.drawBLine(dxf, Line43, 0.5, contour);
            Vector2[] Line44 = { v42, v43 };
            fun.drawBLine(dxf, Line44, 0.5, contour);
            Vector2[] Line45 = { v37, v43 };
            fun.drawBLine(dxf, Line45, 0.5, contour);
            Vector2[] Line46 = { v41, v44 };
            fun.drawBLine(dxf, Line46, 0.25, skdimensioning);
            Vector2[] Line47 = { v45, v44 };
            fun.drawBLine(dxf, Line47, 0.25, skdimensioning);
            Vector2[] Line48 = { v45, v46 };
            fun.drawBLine(dxf, Line48, 0.25, skdimensioning);
            Vector2[] Line49 = { v45, v47 };
            fun.drawBLine(dxf, Line49, 0.25, skdimensioning);
            Vector2[] Line50 = { v48, v45 };
            fun.drawBLine(dxf, Line50, 0.25, skdimensioning);
            Vector2[] Line51 = { v49, v41 };
            fun.drawBLine(dxf, Line51, 0.25, skdimensioning);
            Vector2[] Line52 = { v50, v44 };
            fun.drawBLine(dxf, Line52, 0.25, skdimensioning);
            Vector2[] Line53 = { v51, v46 };
            fun.drawBLine(dxf, Line53, 0.25, skdimensioning);
            Vector2[] Line54 = { v51, v47 };
            fun.drawBLine(dxf, Line54, 0.25, skdimensioning);
            Vector2[] Line55 = { v51, v52 };
            fun.drawBLine(dxf, Line55, 0.25, skdimensioning);
            Vector2[] Line56 = { v48, v52 };
            fun.drawBLine(dxf, Line56, 0.25, skdimensioning);
            Vector2[] Line57 = { v32, v53 };
            fun.drawBLine(dxf, Line57, 0.5, contour);
            Vector2[] Line58 = { v54, v53 };
            fun.drawBLine(dxf, Line58, 0.5, contour);
            Vector2[] Line59 = { v54, v55 };
            fun.drawBLine(dxf, Line59, 0.5, contour);
            Vector2[] Line60 = { v56, v55 };
            fun.drawBLine(dxf, Line60, 0.5, contour);
            Vector2[] Line61 = { v57, v58 };
            fun.drawPlinetype(dxf, Line61,0.35, refin, Linetype.Dashed);
            Vector2[] Line62 = { v59, v60 };
            fun.drawPlinetype(dxf, Line62, 0.35,refin, Linetype.Dashed);
            Vector2[] Line63 = { v58, v60 };
            fun.drawPlinetype(dxf, Line63, 0.35,refin, Linetype.Dashed);
            Vector2[] Line64 = { v61, v60 };
            fun.drawPlinetype(dxf, Line64, 0.35,refin, Linetype.Dashed);
            Vector2[] Line65 = { v61, v58 };
            fun.drawPlinetype(dxf, Line65, 0.35,refin, Linetype.Dashed);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v53));
            Arc3.Vertexes.Add(new LwPolylineVertex(v62));
            Arc3.Vertexes[0].Bulge = h / 200;
            fun.PolyFill(dxf, Arc3, 0.5, contour);
            Vector2[] Line66 = { v63, v62 };
            fun.drawBLine(dxf, Line66, 0.5, contour);
            Vector2[] Line67 = { v34, v63 };
            fun.drawBLine(dxf, Line67, 0.5, contour);
            Vector2[] Line68 = { v64, v62 };
            fun.drawBLine(dxf, Line68, 0.5, contour);
            Vector2[] Line69 = { v65, v54 };
            fun.drawBLine(dxf, Line69, 0.5, contour);
            Vector2[] Line70 = { v66, v51 };
            fun.drawBLine(dxf, Line70, 0.25, skdimensioning);
            //
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v63));
            Arc4.Vertexes.Add(new LwPolylineVertex(v67));
            Arc4.Vertexes[0].Bulge = h / 200;
            fun.PolyFill(dxf, Arc4, 0.5, contour);
            Vector2[] Line71 = { v64, v68 };
            fun.drawBLine(dxf, Line71, 0.5, contour);
            Vector2[] Line72 = { v69, v68 };
            fun.drawBLine(dxf, Line72, 0.5, contour);
            LwPolyline Arc5 = new LwPolyline();
            Arc5.Vertexes.Add(new LwPolylineVertex(v53));
            Arc5.Vertexes.Add(new LwPolylineVertex(v69));
            Arc5.Vertexes[0].Bulge = -h / 180;
            fun.PolyFill(dxf, Arc5, 0.5, contour);
            Vector2[] Line73 = { v70, v68 };
            fun.drawBLine(dxf, Line73, 0.5, contour);
            LwPolyline Arc6 = new LwPolyline();
            Arc6.Vertexes.Add(new LwPolylineVertex(v66));
            Arc6.Vertexes.Add(new LwPolylineVertex(v71));
            Arc6.Vertexes[0].Bulge = -h / 80;
            fun.PolyFill(dxf, Arc6, 0.25, skdimensioning);
            Vector2[] Line74 = { v71, v66 };
            fun.drawBLine(dxf, Line74, 0.25, skdimensioning);
            LwPolyline Arc7 = new LwPolyline();
            Arc7.Vertexes.Add(new LwPolylineVertex(v69));
            Arc7.Vertexes.Add(new LwPolylineVertex(v70));
            Arc7.Vertexes[0].Bulge = -h / 200;
            fun.PolyFill(dxf, Arc7, 0.5, contour);
            Vector2[] Line75 = { v73, v72 };
            fun.drawBLine(dxf, Line75, 0.5, contour);
            Vector2[] Line76 = { v73, v74 };
            fun.drawBLine(dxf, Line76, 0.5, contour);
            Vector2[] Line77 = { v75, v76 };
            fun.drawBLine(dxf, Line77, 0.5, contour);
            Vector2[] Line78 = { v75, v53 };
            fun.drawBLine(dxf, Line78, 0.5, contour);
            Vector2[] Line79 = { v76, v77 };
            fun.drawBLine(dxf, Line79, 0.5, contour);
            LwPolyline Arc8 = new LwPolyline();
            Arc8.Vertexes.Add(new LwPolylineVertex(v76));
            Arc8.Vertexes.Add(new LwPolylineVertex(v78));
            Arc8.Vertexes[0].Bulge = h / 160;
            fun.PolyFill(dxf, Arc8, 0.5, contour);
            Vector2[] Line80 = { v78, v79 };
            fun.drawBLine(dxf, Line80, 0.5, contour);
            Vector2[] Line81 = { v78, v80 };
            fun.drawBLine(dxf, Line81, 0.5, contour);
            //
            Vector2[] Line82 = { v70, v80 };
            fun.drawBLine(dxf, Line82, 0.5, contour);
            Vector2[] Line83 = { v42, v81 };
            fun.drawBLine(dxf, Line83, 0.5, contour);
            LwPolyline Arc9 = new LwPolyline();
            Arc9.Vertexes.Add(new LwPolylineVertex(v81));
            Arc9.Vertexes.Add(new LwPolylineVertex(v82));
            Arc9.Vertexes[0].Bulge = -h / 160;
            fun.PolyFill(dxf, Arc9, 0.5, contour);
            Vector2[] Line84 = { v83, v82 };
            fun.drawBLine(dxf, Line84, 0.5, contour);
            Vector2[] Line85 = { v84, v81 };
            fun.drawBLine(dxf, Line85, 0.5, contour);
            LwPolyline Arc10 = new LwPolyline();
            Arc10.Vertexes.Add(new LwPolylineVertex(v74));
            Arc10.Vertexes.Add(new LwPolylineVertex(v84));
            Arc10.Vertexes[0].Bulge = h / 100;
            fun.PolyFill(dxf, Arc10, 0.5, contour);
            Vector2[] Line86 = { v85, v82 };
            fun.drawBLine(dxf, Line86, 0.5, contour);
            LwPolyline Arc11 = new LwPolyline();
            Arc11.Vertexes.Add(new LwPolylineVertex(v85));
            Arc11.Vertexes.Add(new LwPolylineVertex(v84));
            Arc11.Vertexes[0].Bulge = h / 120;
            fun.PolyFill(dxf, Arc11, 0.5, contour);
            Vector2[] Line87 = { v86, v67 };
            fun.drawBLine(dxf, Line87, 0.5, contour);
            Vector2[] Line88 = { v86, v87 };
            fun.drawBLine(dxf, Line88, 0.5, contour);
            Vector2[] Line89 = { v86, v88 };
            fun.drawBLine(dxf, Line89, 0.5, contour);
            Vector2[] Line90 = { v89, v88 };
            fun.drawBLine(dxf, Line90, 0.5, contour);
            Vector2[] Line91 = { v89, v90 };
            fun.drawBLine(dxf, Line91, 0.5, contour);
            Vector2[] Line92 = { v91, v90 };
            fun.drawBLine(dxf, Line92, 0.5, contour);
            Vector2[] Line93 = { v92, v90 };
            fun.drawBLine(dxf, Line93, 0.5, contour);
            Vector2[] Line94 = { v93, v89 };
            fun.drawBLine(dxf, Line94, 0.5, contour);
            LwPolyline Arc12 = new LwPolyline();
            Arc12.Vertexes.Add(new LwPolylineVertex(v90));
            Arc12.Vertexes.Add(new LwPolylineVertex(v94));
            Arc12.Vertexes[0].Bulge = h / 80;
            fun.PolyFill(dxf, Arc12, 0.5, contour);
            Vector2[] Line95 = { v90, v95 };
            fun.drawPlinetype(dxf, Line95,0.35, refin, Linetype.Dashed);
            LwPolyline Arc13 = new LwPolyline();
            Arc13.Vertexes.Add(new LwPolylineVertex(v85));
            Arc13.Vertexes.Add(new LwPolylineVertex(v96));
            Arc13.Vertexes[0].Bulge = h / 180;
            fun.PolyFill(dxf, Arc13, 0.5, contour);
            LwPolyline Arc14 = new LwPolyline();
            Arc14.Vertexes.Add(new LwPolylineVertex(v88));
            Arc14.Vertexes.Add(new LwPolylineVertex(v97));
            Arc14.Vertexes[0].Bulge = h / 160;
            fun.PolyFill(dxf, Arc14, 0.5, contour);
            Vector2[] Line96 = { v96, v80 };
            fun.drawBLine(dxf, Line96, 0.5, contour);
            Vector2[] Line97 = { v98, v90 };
            fun.drawBLine(dxf, Line97, 0.5, contour);
            LwPolyline Arc15 = new LwPolyline();
            Arc15.Vertexes.Add(new LwPolylineVertex(v96));
            Arc15.Vertexes.Add(new LwPolylineVertex(v99));
            Arc15.Vertexes[0].Bulge = h / 260;
            fun.PolyFill(dxf, Arc15, 0.5, contour);
            Vector2[] Line98 = { v100, v99 };
            fun.drawBLine(dxf, Line98, 0.5, contour);
            Vector2[] Line99 = { v101, v79 };
            fun.drawBLine(dxf, Line99, 0.5, contour);
            LwPolyline Arc16 = new LwPolyline();
            Arc16.Vertexes.Add(new LwPolylineVertex(v79));
            Arc16.Vertexes.Add(new LwPolylineVertex(v102));
            Arc16.Vertexes[0].Bulge = -h / 260;
            fun.PolyFill(dxf, Arc16, 0.5, contour);
            LwPolyline Arc17 = new LwPolyline();
            Arc17.Vertexes.Add(new LwPolylineVertex(v103));
            Arc17.Vertexes.Add(new LwPolylineVertex(v102));
            Arc17.Vertexes[0].Bulge = -h / 44;
            fun.PolyFill(dxf, Arc17, 0.5, contour);
            Vector2[] Line100 = { v103, v104 };
            fun.drawBLine(dxf, Line100, 0.5, contour);
            LwPolyline Arc18 = new LwPolyline();
            Arc18.Vertexes.Add(new LwPolylineVertex(v104));
            Arc18.Vertexes.Add(new LwPolylineVertex(v105));
            Arc18.Vertexes[0].Bulge = h / 360;
            fun.PolyFill(dxf, Arc18, 0.5, contour);
            Vector2[] Line101 = { v103, v106 };
            fun.drawBLine(dxf, Line101, 0.5, contour);
            Vector2[] Line102 = { v102, v107 };
            fun.drawBLine(dxf, Line102, 0.5, contour);
            Vector2[] Line103 = { v101, v108 };
            fun.drawBLine(dxf, Line103, 0.5, contour);
            Vector2[] Line104 = { v109, v108 };
            fun.drawBLine(dxf, Line104, 0.5, contour);
            Vector2[] Line105 = { v109, v110 };
            fun.drawBLine(dxf, Line105, 0.5, contour);
            Vector2[] Line106 = { v111, v112 };
            fun.drawBLine(dxf, Line106, 0.5, contour);
            Vector2[] Line107 = { v110, v113 };
            fun.drawBLine(dxf, Line107, 0.5, contour);
            Vector2[] Line108 = { v101, v113 };
            fun.drawBLine(dxf, Line108, 0.5, contour);
            Vector2[] Line109 = { v114, v115 };
            fun.drawBLine(dxf, Line109, 0.5, contour);
            Vector2[] Line110 = { v112, v115 };
            fun.drawBLine(dxf, Line110, 0.5, contour);
            //
            Vector2[] Line111 = { v116, v117 };
            fun.drawBLine(dxf, Line111, 0.5, contour);
            Vector2[] Line112 = { v118, v117 };
            fun.drawBLine(dxf, Line112, 0.5, contour);
            Vector2[] Line113 = { v118, v119 };
            fun.drawBLine(dxf, Line113, 0.5, contour);
            Vector2[] Line114 = { v116, v119 };
            fun.drawBLine(dxf, Line114, 0.5, contour);
            Vector2[] Line115 = { v120, v121 };
            fun.drawBLine(dxf, Line115, 0.25, skdimensioning);
            //
            LwPolyline Arc19 = new LwPolyline();
            Arc19.Vertexes.Add(new LwPolylineVertex(v48));
            Arc19.Vertexes.Add(new LwPolylineVertex(v122));
            Arc19.Vertexes[0].Bulge = h / 360;
            fun.PolyFill(dxf, Arc19, 0.35, refin);
            LwPolyline Arc20 = new LwPolyline();
            Arc20.Vertexes.Add(new LwPolylineVertex(v52));
            Arc20.Vertexes.Add(new LwPolylineVertex(v123));
            Arc20.Vertexes[0].Bulge = h / 300;
            fun.PolyFill(dxf, Arc20, 0.35, refin);
            LwPolyline Arc21 = new LwPolyline();
            Arc21.Vertexes.Add(new LwPolylineVertex(v125));
            Arc21.Vertexes.Add(new LwPolylineVertex(v124));
            Arc21.Vertexes[0].Bulge = -h / 320;
            fun.PolyFill(dxf, Arc21, 0.35, refin);
            //
            LwPolyline Arc22 = new LwPolyline();
            Arc22.Vertexes.Add(new LwPolylineVertex(v90));
            Arc22.Vertexes.Add(new LwPolylineVertex(v123));
            Arc22.Vertexes[0].Bulge = -h / 400;
            fun.PolyFill(dxf, Arc22, 0.35, refin);
            LwPolyline Arc23 = new LwPolyline();
            Arc23.Vertexes.Add(new LwPolylineVertex(v125));
            Arc23.Vertexes.Add(new LwPolylineVertex(v126));
            Arc23.Vertexes[0].Bulge = h / 360;
            fun.PolyFill(dxf, Arc23, 0.35, refin);
            LwPolyline Arc24 = new LwPolyline();
            Arc24.Vertexes.Add(new LwPolylineVertex(v71));
            Arc24.Vertexes.Add(new LwPolylineVertex(v122));
            Arc24.Vertexes[0].Bulge = -h / 320;
            fun.PolyFill(dxf, Arc24, 0.35, refin);
            LwPolyline Arc25 = new LwPolyline();
            Arc25.Vertexes.Add(new LwPolylineVertex(v123));
            Arc25.Vertexes.Add(new LwPolylineVertex(v127));
            Arc25.Vertexes[0].Bulge = -h / 360;
            fun.PolyFill(dxf, Arc25, 0.35, refin);
            LwPolyline Arc26 = new LwPolyline();
            Arc26.Vertexes.Add(new LwPolylineVertex(v125));
            Arc26.Vertexes.Add(new LwPolylineVertex(v128));
            Arc26.Vertexes[0].Bulge = -h / 360;
            fun.PolyFill(dxf, Arc26, 0.35, refin);
            LwPolyline Arc27 = new LwPolyline();
            Arc27.Vertexes.Add(new LwPolylineVertex(v122));
            Arc27.Vertexes.Add(new LwPolylineVertex(v129));
            Arc27.Vertexes[0].Bulge = -h / 360;
            fun.PolyFill(dxf, Arc27, 0.35, refin);
            //
            LwPolyline Arc28 = new LwPolyline();
            Arc28.Vertexes.Add(new LwPolylineVertex(v123));
            Arc28.Vertexes.Add(new LwPolylineVertex(v130));
            Arc28.Vertexes[0].Bulge = h / 360;
            fun.PolyFill(dxf, Arc28, 0.35, refin);
            LwPolyline Arc29 = new LwPolyline();
            Arc29.Vertexes.Add(new LwPolylineVertex(v125));
            Arc29.Vertexes.Add(new LwPolylineVertex(v131));
            Arc29.Vertexes[0].Bulge = h / 360;
            fun.PolyFill(dxf, Arc29, 0.35, refin);
            LwPolyline Arc30 = new LwPolyline();
            Arc30.Vertexes.Add(new LwPolylineVertex(v122));
            Arc30.Vertexes.Add(new LwPolylineVertex(v132));
            Arc30.Vertexes[0].Bulge = h / 400;
            fun.PolyFill(dxf, Arc30, 0.35, refin);
            Vector2[] Line116 = { v130, v133 };
            fun.drawPlinetype(dxf, Line116,0.35, refin, Linetype.Dashed);
            Vector2[] Line117 = { v131, v134 };
            fun.drawPlinetype(dxf, Line117, 0.35,refin, Linetype.Dashed);
            Vector2[] Line118 = { v132, v135 };
            fun.drawPlinetype(dxf, Line118, 0.35,refin, Linetype.Dashed);
            //
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v1.X - h / 6, v1.Y), new Vector2(v1.X + l1, v1.Y) }, 0.25,centre, Linetype.Center);
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v27.X - h / 1.6, v27.Y + h / 22), new Vector2(v19.X + h + h / 6.8, v19.Y - h / 26) }, 0.25, centre, Linetype.Center);
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v28.X - h / 1.6, v28.Y - h / 22), new Vector2(v18.X + h + h / 6.8, v18.Y + h / 26) }, 0.25, centre, Linetype.Center);
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v49.X, v49.Y - h / 16), new Vector2(v49.X, v49.Y + h + h / 3.8) }, 0.25, centre, Linetype.Center);
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 1;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 0.8;
            double offset = 6;
            LinearDimension dim1 = new LinearDimension(new Line(v6, v7), offset * 3, 90, dimensionStyle);
            dim1.UserText = "Φ25 ";
            dxf.AddEntity(dim1);
            LinearDimension dim2 = new LinearDimension(new Line(v32, v33), offset * 14, 90, dimensionStyle);
            dim2.UserText = "Φ32 ";
            dxf.AddEntity(dim2);
            LinearDimension dim3 = new LinearDimension(new Line(v112, v113), offset * 3, 270, dimensionStyle);
            dim3.UserText = "Φ21 ";
            dxf.AddEntity(dim3);
            LinearDimension dim4 = new LinearDimension(new Line(v70, v113), offset * 3, 360, dimensionStyle);
            dim4.UserText = "105 ";
            dxf.AddEntity(dim4);
            LinearDimension dim5 = new LinearDimension(new Line(v32, v113), offset * 5, 360, dimensionStyle);
            dim5.UserText = "125 ";
            dxf.AddEntity(dim5);
            LinearDimension dim6 = new LinearDimension(new Line(v7, v32), offset * 8, 360, dimensionStyle);
            dim6.UserText = "56 ";
            dxf.AddEntity(dim6);
            //
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint41(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 25;
            double pi = Math.PI;
            double epsr = 140 * pi / 180;
            double h1 = 32;
            double h3 = 21;
            double l1 = 56;
            double l2 = 125;
            double l3 = 105;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h / 4);
            Vector2 v3 = new Vector2(v1.X, v1.Y - h / 4);
            //
            Vector2 v4 = new Vector2(v2.X, v2.Y + h / 4);
            Vector2 v5 = new Vector2(v3.X, v3.Y - h / 4);
            //
            Vector2 v6 = new Vector2(v4.X + h / 10, v4.Y + h / 8);
            Vector2 v7 = new Vector2(v5.X + h / 10, v5.Y - h / 8);
            //
            Vector2 v8 = new Vector2(v6.X, v6.Y - h / 3);
            Vector2 v9 = new Vector2(v1.X, v8.Y - h / 10);
            //
            Vector2 v10 = new Vector2(v7.X, v7.Y + h / 3);
            Vector2 v11 = new Vector2(v1.X, v10.Y + h / 10);
            //
            Vector2 v12 = new Vector2(v6.X + l1 - h / 10, v6.Y);
            Vector2 v13 = new Vector2(v7.X + l1 - h / 10, v7.Y);
            //
            Vector2 v14 = new Vector2(v8.X + l1 - h / 2.6, v8.Y);
            Vector2 v15 = new Vector2(v10.X + l1 - h / 2.6, v10.Y);
            //
            Vector2 v16 = new Vector2(v8.X + h / 16, v8.Y);
            Vector2 v17 = new Vector2(v10.X + h / 16, v10.Y);
            Vector2 v18 = new Vector2(v17.X + (l1 - h / 2.6) / 2, v17.Y);
            Vector2 v19 = new Vector2(v16.X + (l1 - h / 2.6) / 2, v16.Y);
            Vector2 v20 = new Vector2(v18.X + h / 10, v1.Y);
            Vector2 v21 = new Vector2(v19.X + h / 10, v1.Y);
            //
            Vector2 v22 = new Vector2(v14.X + h / 22, v14.Y - h / 18);
            Vector2 v23 = new Vector2(v15.X + h / 22, v15.Y + h / 18);
            //
            Vector2 v24 = new Vector2(v14.X + (l1 - h / 10) - (l1 - h / 2.6) + h / 16, v14.Y);
            Vector2 v25 = new Vector2(v15.X + (l1 - h / 10) - (l1 - h / 2.6) + h / 16, v15.Y);
            Vector2 v26 = new Vector2(v24.X, v24.Y - h / 12);
            Vector2 v27 = new Vector2(v19.X + h / 30, v19.Y - h / 12);
            //
            Vector2 v28 = new Vector2(v18.X + h / 30, v18.Y + h / 12);
            Vector2 v29 = new Vector2(v25.X, v25.Y + h / 12);
            //
            Vector2 v30 = new Vector2(v1.X, v16.Y + h / 8);
            Vector2 v31 = new Vector2(v1.X, v17.Y - h / 8);
            //第二阶段
            Vector2 v32 = new Vector2(v12.X, v12.Y + (h1 - h));
            Vector2 v33 = new Vector2(v13.X, v13.Y - (h1 - h));
            //圆弧里得斜坡(上）
            Vector2 v34 = new Vector2(v19.X + h + h / 6.8 + h / 30, v19.Y - h / 26);
            Vector2 v35 = new Vector2(v19.X + h + h / 6.8, v27.Y);
            //
            Vector2 v36 = new Vector2(v34.X, v34.Y + h / 16);
            //
            Vector2 v37 = new Vector2(v19.X + h + h / 6.8 + h / 30, v25.Y + h / 26);
            Vector2 v38 = new Vector2(v19.X + h + h / 6.8, v29.Y);
            //
            Vector2 v39 = new Vector2(v37.X, v33.Y - h / 26);
            //
            Vector2 v40 = new Vector2(v29.X, v23.Y + h + h / 22);
            Vector2 v41 = new Vector2(v29.X, v25.Y - h / 20);
            //
            Vector2 v42 = new Vector2(v39.X + (l2 - l3) / 2, v39.Y);
            //
            Vector2 v43 = new Vector2(v42.X, v37.Y);
            //
            Vector2 v44 = new Vector2(v41.X + ((l2 - l3) / 2) * 2.3 / 3, v41.Y);
            Vector2 v45 = new Vector2(v44.X, v25.Y);
            Vector2 v46 = new Vector2(v45.X - h / 36, v37.Y);
            Vector2 v47 = new Vector2(v45.X, v37.Y);
            Vector2 v48 = new Vector2(v42.X, v25.Y);
            //
            Vector2 v49 = new Vector2(v41.X + (((l2 - l3) / 2) * 2.3 / 3) / 2, v41.Y - h / 16);
            Vector2 v50 = new Vector2(v44.X - (((l2 - l3) / 2) * 2.3 / 3) / 2, v44.Y - h / 16);
            //
            Vector2 v51 = new Vector2(v46.X + h / 36, v46.Y + h / 26);
            Vector2 v52 = new Vector2(v42.X, v51.Y);
            //
            Vector2 v53 = new Vector2(v32.X + (l2 - l3) / 2, v32.Y);
            Vector2 v54 = new Vector2(v53.X, v12.Y - h / 3.6);
            Vector2 v55 = new Vector2(v54.X - h / 2.707, v54.Y);
            Vector2 v56 = new Vector2(v55.X, v55.Y - h / 32);
            //
            Vector2 v57 = new Vector2(v32.X + (l2 - l3) / 6, v32.Y);
            Vector2 v58 = new Vector2(v57.X, v57.Y - h / 6);
            Vector2 v59 = new Vector2(v32.X + (l2 - l3) / 2.6, v32.Y);
            Vector2 v60 = new Vector2(v59.X, v57.Y - h / 6);
            Vector2 v61 = new Vector2(v49.X, v60.Y - h / 20);
            //
            Vector2 v62 = new Vector2(v54.X - h / 12, v54.Y);
            Vector2 v63 = new Vector2(v62.X - h / 20, v62.Y - h / 10.5);
            //
            Vector2 v64 = new Vector2(v62.X + h / 8, v62.Y - h / 20);
            Vector2 v65 = new Vector2(v54.X, v54.Y - h / 36);
            //
            Vector2 v66 = new Vector2(v51.X, v51.Y + h / 2.4);
            //
            Vector2 v67 = new Vector2(v66.X, v66.Y - (h / 2.4) / 2.3);
            //
            Vector2 v68 = new Vector2(v64.X + ((l2 - l3) / 2) * 2 / 3, v64.Y);
            Vector2 v69 = new Vector2(v68.X, v68.Y + (h1 - h));
            Vector2 v70 = new Vector2(v68.X + ((l2 - l3) / 2) * 1 / 3, v68.Y);
            //
            Vector2 v71 = new Vector2(v66.X, v66.Y + h / 8.3);
            //
            Vector2 v72 = new Vector2(v66.X - h / 26, v66.Y - (h / 2.4) / 3.2);
            Vector2 v73 = new Vector2(v48.X, v48.Y + h / 24);
            //
            Vector2 v74 = new Vector2(v73.X + (((l2 - l3) / 2) * 2.3 / 3.3) / 1.8, v73.Y - (((l2 - l3) / 2) * 2.3 / 3) / 2.6);
            //上半
            Vector2 v75 = new Vector2(v53.X + h / 36, v53.Y);
            Vector2 v76 = new Vector2(v75.X + ((l2 - l3) / 2) * 2.8 / 3.2, v75.Y - ((l2 - l3) / 2) * 2.6 / 3.6);
            Vector2 v77 = new Vector2(v76.X, v76.Y - h / 7);
            Vector2 v78 = new Vector2(v76.X + h / 8, v76.Y - h / 30);
            //
            Vector2 v79 = new Vector2(v78.X + l3 / 3, v78.Y);
            Vector2 v80 = new Vector2(v78.X, v78.Y - h / 3.2);
            //
            Vector2 v81 = new Vector2(v42.X + ((l2 - l3) / 2) * 2.8 / 3.2, v42.Y + ((l2 - l3) / 2) * 2.6 / 3.6);
            Vector2 v82 = new Vector2(v81.X + h / 8, v81.Y + h / 30);
            Vector2 v83 = new Vector2(v82.X + l3 / 3, v82.Y);
            Vector2 v84 = new Vector2(v81.X, v81.Y + h / 4);
            Vector2 v85 = new Vector2(v82.X, v82.Y + h / 4.7);
            //中间
            Vector2 v86 = new Vector2(v67.X + h / 4, v67.Y - h / 4);
            Vector2 v87 = new Vector2(v86.X, v86.Y - h / 6.3);
            Vector2 v88 = new Vector2(v86.X + h / 12, v86.Y - h / 16);
            Vector2 v89 = new Vector2(v88.X + h / 20, v88.Y + h / 2.1);
            Vector2 v90 = new Vector2(v89.X - h / 36, v89.Y);
            Vector2 v91 = new Vector2(v90.X, v90.Y + h / 8);
            Vector2 v92 = new Vector2(v90.X - h / 10, v90.Y + h / 9);
            Vector2 v93 = new Vector2(v89.X + h / 36, v89.Y + h / 9);
            //
            Vector2 v94 = new Vector2(v90.X - h / 5, v90.Y - h / 3.1);
            Vector2 v95 = new Vector2(v90.X - h / 3, v90.Y);
            //下边
            Vector2 v96 = new Vector2(v85.X + l3 * 2 / 3, v85.Y - h / 36);
            Vector2 v97 = new Vector2(v88.X + l3 * 2 / 2.9, v85.Y);
            //
            Vector2 v98 = new Vector2(v90.X + l3 / 4.6, v90.Y - h / 10);
            //
            Vector2 v99 = new Vector2(v96.X + l3 / 3 - l3 / 8, v96.Y - h / 6);
            Vector2 v100 = new Vector2(v99.X + l3 / 8, v99.Y);
            //
            Vector2 v101 = new Vector2(v79.X + l3 * 2 / 3, v79.Y + h / 80);
            Vector2 v102 = new Vector2(v101.X - l2 / 9, v1.Y + h / 6);
            Vector2 v103 = new Vector2(v102.X + h / 6, v102.Y + h / 8);
            Vector2 v104 = new Vector2(v103.X - h / 26, v101.Y);
            Vector2 v105 = new Vector2(v101.X - l2 / 3.2, v1.Y + h / 2.15);
            Vector2 v106 = new Vector2(v103.X - h / 1.9, v103.Y);
            Vector2 v107 = new Vector2(v102.X, v102.Y + h / 8);
            //
            Vector2 v108 = new Vector2(v101.X + h / 22, v101.Y - h / 3.2);
            Vector2 v109 = new Vector2(v108.X - h / 3, v108.Y - h / 30);
            Vector2 v110 = new Vector2(v109.X - h / 24, v101.Y);
            //下底右边
            Vector2 v111 = new Vector2(v108.X - h / 23, v108.Y - h / 200);
            Vector2 v112 = new Vector2(v111.X, v111.Y - h3 - h / 28);
            //上侧斜边
            Vector2 v113 = new Vector2(v110.X + h / 3.07, v110.Y + h / 40);
            //
            Vector2 v114 = new Vector2(v111.X - (h / 23) * 1.3, v111.Y - (h / 200) * 1.3);
            Vector2 v115 = new Vector2(v114.X, v114.Y - h3 / 1.2);
            //
            Vector2 v116 = new Vector2(v101.X + h / 40, v115.Y + h / 5.6);
            Vector2 v117 = new Vector2(v108.X - h / 3.1, v116.Y - h / 30);
            Vector2 v118 = new Vector2(v109.X - h / 40, v117.Y + h / 3.5);
            Vector2 v119 = new Vector2(v110.X + h / 3.1, v118.Y + h / 40);
            //虚线段
            Vector2 v120 = new Vector2(v1.X + l1, v1.Y);
            Vector2 v121 = new Vector2(v120.X + l2 + h / 3, v120.Y);
            //*/
            Vector2 v122 = new Vector2(v120.X + l2 / 1.2, v120.Y);
            Vector2 v123 = new Vector2(v120.X + l2 / 1.6, v120.Y);
            Vector2 v124 = new Vector2(v52.X, v37.Y);
            Vector2 v125 = new Vector2(v120.X + l2 / 1.4, v120.Y);
            //
            Vector2 v126 = new Vector2(v89.X - h / 36, v89.Y + h / 20);
            Vector2 v127 = new Vector2(v123.X + h * 1.59, v123.Y + h / 3.7);
            //
            Vector2 v128 = new Vector2(v127.X + h / 9, v123.Y + h / 4);
            Vector2 v129 = new Vector2(v128.X + h / 3.5, v128.Y - h / 10);
            //
            Vector2 v130 = new Vector2(v123.X + h * 1.3, v1.Y - h / 5);
            Vector2 v131 = new Vector2(v123.X + h * 1.3, v1.Y - h / 7);
            Vector2 v132 = new Vector2(v123.X + h * 1.3, v1.Y - h / 20);
            //
            Vector2 v133 = new Vector2(v130.X + h / 1.44, v130.Y + h / 16);
            Vector2 v134 = new Vector2(v131.X + h / 1.46, v131.Y + h / 16);
            Vector2 v135 = new Vector2(v132.X + h / 1.46, v132.Y + h / 16);
            //线段
            //主视图
            //Vector2[] Line1 = { v1, v2 };
            //fun.drawBLine(dxf, Line1, 0.15, contour);
            //Vector2[] Line2 = { v1, v3 };
            //fun.drawBLine(dxf, Line2, 0.15, contour);
            //Vector2[] Line3 = { v2, v4 };
            //fun.drawBLine(dxf, Line3, 0.15, contour);
            //Vector2[] Line4 = { v3, v5 };
            //fun.drawBLine(dxf, Line4, 0.15, contour);
            //Vector2[] Line5 = { v4, v6 };
            //fun.drawBLine(dxf, Line5, 0.15, contour);
            //Vector2[] Line6 = { v5, v7 };
            //fun.drawBLine(dxf, Line6, 0.15, contour);
            //Vector2[] Line7 = { v6, v8 };
            //fun.drawBLine(dxf, Line7, 0.15, contour);
            //
            //Vector2[] Line8 = { v9, v8 };
            //fun.drawBLine(dxf, Line8, 0.15, contour);
            ////
            //Vector2[] Line9 = { v7, v10 };
            //fun.drawBLine(dxf, Line9, 0.15, contour);
            //Vector2[] Line10 = { v11, v10 };
            //fun.drawBLine(dxf, Line10, 0.15, contour);
            ////
            //Vector2[] Line11 = { v12, v6 };
            //fun.drawBLine(dxf, Line11, 0.15, contour);
            //Vector2[] Line12 = { v13, v7 };
            //fun.drawBLine(dxf, Line12, 0.15, contour);
            Vector2[] Line13 = { v13, v12 };
            fun.drawBLine(dxf, Line13, 0.5, contour);
            ////
            //Vector2[] Line14 = { v14, v8 };
            //fun.drawBLine(dxf, Line14, 0.15, contour);
            //Vector2[] Line15 = { v14, v15 };
            //fun.drawBLine(dxf, Line15, 0.15, contour);
            //Vector2[] Line16 = { v15, v10 };
            //fun.drawBLine(dxf, Line16, 0.15, contour);
            ////
            //Vector2[] Line17 = { v17, v16 };
            //fun.drawPlinetype(dxf, Line17, refin, Linetype.Dashed);
            //Vector2[] Line18 = { v17, v18 };
            //fun.drawPlinetype(dxf, Line18, refin, Linetype.Dashed);
            //Vector2[] Line19 = { v16, v19 };
            //fun.drawPlinetype(dxf, Line19, refin, Linetype.Dashed);
            //Vector2[] Line20 = { v18, v19 };
            //fun.drawPlinetype(dxf, Line20, refin, Linetype.Dashed);
            //Vector2[] Line21 = { v18, v20 };
            //fun.drawPlinetype(dxf, Line21, refin, Linetype.Dashed);
            //Vector2[] Line22 = { v19, v21 };
            //fun.drawPlinetype(dxf, Line22, refin, Linetype.Dashed);
            //
            //Vector2[] Line23 = { v14, v22 };
            //fun.drawBLine(dxf, Line23, 0.15, contour);
            //Vector2[] Line24 = { v15, v23 };
            //fun.drawBLine(dxf, Line24, 0.15, contour);
            //Vector2[] Line25 = { v22, v23 };
            //fun.drawBLine(dxf, Line25, 0.15, contour);
            //Vector2[] Line26 = { v14, v24 };
            //fun.drawPlinetype(dxf, Line26, refin, Linetype.Dashed);
            //Vector2[] Line27 = { v15, v25 };
            //fun.drawPlinetype(dxf, Line27, refin, Linetype.Dashed);
            //Vector2[] Line28 = { v26, v27 };
            //fun.drawPlinetype(dxf, Line28, refin, Linetype.Dashed);
            //Vector2[] Line29 = { v28, v29 };
            //fun.drawPlinetype(dxf, Line29, refin, Linetype.Dashed);
            //LwPolyline Arc1 = new LwPolyline();
            //Arc1.Vertexes.Add(new LwPolylineVertex(v24));
            //Arc1.Vertexes.Add(new LwPolylineVertex(v26));
            //Arc1.Vertexes[0].Bulge = -h / 36;
            //fun.PolyFill(dxf, Arc1, 0.08, refin);
            //LwPolyline Arc2 = new LwPolyline();
            //Arc2.Vertexes.Add(new LwPolylineVertex(v25));
            //Arc2.Vertexes.Add(new LwPolylineVertex(v29));
            //Arc2.Vertexes[0].Bulge = h / 36;
            //fun.PolyFill(dxf, Arc2, 0.08, refin);
            //Vector2[] Line30 = { v16, v30 };
            //fun.drawBLine(dxf, Line30, 0.08, refin);
            //Vector2[] Line31 = { v17, v31 };
            //fun.drawBLine(dxf, Line31, 0.08, refin);
            //
            Vector2[] Line32 = { v32, v12 };
            fun.drawBLine(dxf, Line32, 0.5, contour);
            Vector2[] Line33 = { v33, v13 };
            fun.drawBLine(dxf, Line33, 0.5, contour);
            Vector2[] Line34 = { v34, v35 };
            fun.drawBLine(dxf, Line34, 0.5, contour);
            Vector2[] Line35 = { v34, v36 };
            fun.drawBLine(dxf, Line35, 0.5, contour);
            Vector2[] Line36 = { v37, v38 };
            fun.drawBLine(dxf, Line36, 0.5, contour);
            Vector2[] Line37 = { v39, v37 };
            fun.drawBLine(dxf, Line37, 0.5, contour);
            Vector2[] Line38 = { v39, v33 };
            fun.drawBLine(dxf, Line38, 0.5, contour);
            //Vector2[] Line39 = { v26, v29 };
            //fun.drawPlinetype(dxf, Line39, refin, Linetype.Dashed);
            //Vector2[] Line40 = { v24, v40 };
            //fun.drawPlinetype(dxf, Line40, refin, Linetype.Dashed);
            //Vector2[] Line41 = { v32, v40 };
            //fun.drawPlinetype(dxf, Line41, refin, Linetype.Dashed);
            //Vector2[] Line42 = { v25, v41 };
            //fun.drawBLine(dxf, Line42, 0.08, skdimensioning);
            Vector2[] Line43 = { v42, v39 };
            fun.drawBLine(dxf, Line43, 0.5, contour);
            Vector2[] Line44 = { v42, v43 };
            fun.drawBLine(dxf, Line44, 0.5, contour);
            Vector2[] Line45 = { v37, v43 };
            fun.drawBLine(dxf, Line45, 0.15, contour);
            //Vector2[] Line46 = { v41, v44 };
            //fun.drawBLine(dxf, Line46, 0.08, skdimensioning);
            //Vector2[] Line47 = { v45, v44 };
            //fun.drawBLine(dxf, Line47, 0.08, skdimensioning);
            //Vector2[] Line48 = { v45, v46 };
            //fun.drawBLine(dxf, Line48, 0.08, skdimensioning);
            //Vector2[] Line49 = { v45, v47 };
            //fun.drawBLine(dxf, Line49, 0.08, skdimensioning);
            //Vector2[] Line50 = { v48, v45 };
            //fun.drawBLine(dxf, Line50, 0.08, skdimensioning);
            //Vector2[] Line51 = { v49, v41 };
            //fun.drawBLine(dxf, Line51, 0.08, skdimensioning);
            //Vector2[] Line52 = { v50, v44 };
            //fun.drawBLine(dxf, Line52, 0.08, skdimensioning);
            //Vector2[] Line53 = { v51, v46 };
            //fun.drawBLine(dxf, Line53, 0.08, skdimensioning);
            //Vector2[] Line54 = { v51, v47 };
            //fun.drawBLine(dxf, Line54, 0.08, skdimensioning);
            //Vector2[] Line55 = { v51, v52 };
            //fun.drawBLine(dxf, Line55, 0.08, skdimensioning);
            //Vector2[] Line56 = { v48, v52 };
            //fun.drawBLine(dxf, Line56, 0.08, skdimensioning);
            Vector2[] Line57 = { v32, v53 };
            fun.drawBLine(dxf, Line57, 0.5, contour);
            Vector2[] Line58 = { v54, v53 };
            fun.drawBLine(dxf, Line58, 0.5, contour);
            Vector2[] Line59 = { v54, v55 };
            fun.drawBLine(dxf, Line59, 0.5, contour);
            Vector2[] Line60 = { v56, v55 };
            fun.drawBLine(dxf, Line60, 0.5, contour);
            //Vector2[] Line61 = { v57, v58 };
            //fun.drawPlinetype(dxf, Line61, refin, Linetype.Dashed);
            //Vector2[] Line62 = { v59, v60 };
            //fun.drawPlinetype(dxf, Line62, refin, Linetype.Dashed);
            //Vector2[] Line63 = { v58, v60 };
            //fun.drawPlinetype(dxf, Line63, refin, Linetype.Dashed);
            //Vector2[] Line64 = { v61, v60 };
            //fun.drawPlinetype(dxf, Line64, refin, Linetype.Dashed);
            //Vector2[] Line65 = { v61, v58 };
            //fun.drawPlinetype(dxf, Line65, refin, Linetype.Dashed);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v53));
            Arc3.Vertexes.Add(new LwPolylineVertex(v62));
            Arc3.Vertexes[0].Bulge = h / 200;
            fun.PolyFill(dxf, Arc3, 0.5, contour);
            Vector2[] Line66 = { v63, v62 };
            fun.drawBLine(dxf, Line66, 0.5, contour);
            Vector2[] Line67 = { v34, v63 };
            fun.drawBLine(dxf, Line67, 0.5, contour);
            Vector2[] Line68 = { v64, v62 };
            fun.drawBLine(dxf, Line68, 0.5, contour);
            Vector2[] Line69 = { v65, v54 };
            fun.drawBLine(dxf, Line69, 0.5, contour);
            //Vector2[] Line70 = { v66, v51 };
            //fun.drawBLine(dxf, Line70, 0.08, skdimensioning);
            //
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v63));
            Arc4.Vertexes.Add(new LwPolylineVertex(v67));
            Arc4.Vertexes[0].Bulge = h / 200;
            fun.PolyFill(dxf, Arc4, 0.5, contour);
            Vector2[] Line71 = { v64, v68 };
            fun.drawBLine(dxf, Line71, 0.5, contour);
            Vector2[] Line72 = { v69, v68 };
            fun.drawBLine(dxf, Line72, 0.5, contour);
            LwPolyline Arc5 = new LwPolyline();
            Arc5.Vertexes.Add(new LwPolylineVertex(v53));
            Arc5.Vertexes.Add(new LwPolylineVertex(v69));
            Arc5.Vertexes[0].Bulge = -h / 180;
            fun.PolyFill(dxf, Arc5, 0.5, contour);
            Vector2[] Line73 = { v70, v68 };
            fun.drawBLine(dxf, Line73, 0.5, contour);
            //LwPolyline Arc6 = new LwPolyline();
            //Arc6.Vertexes.Add(new LwPolylineVertex(v66));
            //Arc6.Vertexes.Add(new LwPolylineVertex(v71));
            //Arc6.Vertexes[0].Bulge = -h / 80;
            //fun.PolyFill(dxf, Arc6, 0.08, skdimensioning);
            //Vector2[] Line74 = { v71, v66 };
            //fun.drawBLine(dxf, Line74, 0.08, skdimensioning);
            LwPolyline Arc7 = new LwPolyline();
            Arc7.Vertexes.Add(new LwPolylineVertex(v69));
            Arc7.Vertexes.Add(new LwPolylineVertex(v70));
            Arc7.Vertexes[0].Bulge = -h / 200;
            fun.PolyFill(dxf, Arc7, 0.5, contour);
            Vector2[] Line75 = { v73, v72 };
            fun.drawBLine(dxf, Line75, 0.5, contour);
            Vector2[] Line76 = { v73, v74 };
            fun.drawBLine(dxf, Line76, 0.5, contour);
            Vector2[] Line77 = { v75, v76 };
            fun.drawBLine(dxf, Line77, 0.5, contour);
            Vector2[] Line78 = { v75, v53 };
            fun.drawBLine(dxf, Line78, 0.5, contour);
            Vector2[] Line79 = { v76, v77 };
            fun.drawBLine(dxf, Line79, 0.5, contour);
            LwPolyline Arc8 = new LwPolyline();
            Arc8.Vertexes.Add(new LwPolylineVertex(v76));
            Arc8.Vertexes.Add(new LwPolylineVertex(v78));
            Arc8.Vertexes[0].Bulge = h / 160;
            fun.PolyFill(dxf, Arc8, 0.5, contour);
            Vector2[] Line80 = { v78, v79 };
            fun.drawBLine(dxf, Line80, 0.5, contour);
            Vector2[] Line81 = { v78, v80 };
            fun.drawBLine(dxf, Line81, 0.5, contour);
            //
            Vector2[] Line82 = { v70, v80 };
            fun.drawBLine(dxf, Line82, 0.5, contour);
            Vector2[] Line83 = { v42, v81 };
            fun.drawBLine(dxf, Line83, 0.5, contour);
            LwPolyline Arc9 = new LwPolyline();
            Arc9.Vertexes.Add(new LwPolylineVertex(v81));
            Arc9.Vertexes.Add(new LwPolylineVertex(v82));
            Arc9.Vertexes[0].Bulge = -h / 160;
            fun.PolyFill(dxf, Arc9, 0.5, contour);
            Vector2[] Line84 = { v83, v82 };
            fun.drawBLine(dxf, Line84, 0.5, contour);
            Vector2[] Line85 = { v84, v81 };
            fun.drawBLine(dxf, Line85, 0.5, contour);
            LwPolyline Arc10 = new LwPolyline();
            Arc10.Vertexes.Add(new LwPolylineVertex(v74));
            Arc10.Vertexes.Add(new LwPolylineVertex(v84));
            Arc10.Vertexes[0].Bulge = h / 100;
            fun.PolyFill(dxf, Arc10, 0.5, contour);
            Vector2[] Line86 = { v85, v82 };
            fun.drawBLine(dxf, Line86, 0.5, contour);
            LwPolyline Arc11 = new LwPolyline();
            Arc11.Vertexes.Add(new LwPolylineVertex(v85));
            Arc11.Vertexes.Add(new LwPolylineVertex(v84));
            Arc11.Vertexes[0].Bulge = h / 120;
            fun.PolyFill(dxf, Arc11, 0.5, contour);
            Vector2[] Line87 = { v86, v67 };
            fun.drawBLine(dxf, Line87, 0.5, contour);
            Vector2[] Line88 = { v86, v87 };
            fun.drawBLine(dxf, Line88, 0.5, contour);
            Vector2[] Line89 = { v86, v88 };
            fun.drawBLine(dxf, Line89, 0.5, contour);
            Vector2[] Line90 = { v89, v88 };
            fun.drawBLine(dxf, Line90, 0.5, contour);
            Vector2[] Line91 = { v89, v90 };
            fun.drawBLine(dxf, Line91, 0.5, contour);
            Vector2[] Line92 = { v91, v90 };
            fun.drawBLine(dxf, Line92, 0.5, contour);
            Vector2[] Line93 = { v92, v90 };
            fun.drawBLine(dxf, Line93, 0.5, contour);
            Vector2[] Line94 = { v93, v89 };
            fun.drawBLine(dxf, Line94, 0.5, contour);
            LwPolyline Arc12 = new LwPolyline();
            Arc12.Vertexes.Add(new LwPolylineVertex(v90));
            Arc12.Vertexes.Add(new LwPolylineVertex(v94));
            Arc12.Vertexes[0].Bulge = h / 80;
            fun.PolyFill(dxf, Arc12, 0.5, contour);
            //Vector2[] Line95 = { v90, v95 };
            //fun.drawPlinetype(dxf, Line95, refin, Linetype.Dashed);
            LwPolyline Arc13 = new LwPolyline();
            Arc13.Vertexes.Add(new LwPolylineVertex(v85));
            Arc13.Vertexes.Add(new LwPolylineVertex(v96));
            Arc13.Vertexes[0].Bulge = h / 180;
            fun.PolyFill(dxf, Arc13, 0.5, contour);
            LwPolyline Arc14 = new LwPolyline();
            Arc14.Vertexes.Add(new LwPolylineVertex(v88));
            Arc14.Vertexes.Add(new LwPolylineVertex(v97));
            Arc14.Vertexes[0].Bulge = h / 160;
            fun.PolyFill(dxf, Arc14, 0.5, contour);
            Vector2[] Line96 = { v96, v80 };
            fun.drawBLine(dxf, Line96, 0.5, contour);
            Vector2[] Line97 = { v98, v90 };
            fun.drawBLine(dxf, Line97, 0.5, contour);
            LwPolyline Arc15 = new LwPolyline();
            Arc15.Vertexes.Add(new LwPolylineVertex(v96));
            Arc15.Vertexes.Add(new LwPolylineVertex(v99));
            Arc15.Vertexes[0].Bulge = h / 260;
            fun.PolyFill(dxf, Arc15, 0.5, contour);
            Vector2[] Line98 = { v100, v99 };
            fun.drawBLine(dxf, Line98, 0.5, contour);
            Vector2[] Line99 = { v101, v79 };
            fun.drawBLine(dxf, Line99, 0.5, contour);
            LwPolyline Arc16 = new LwPolyline();
            Arc16.Vertexes.Add(new LwPolylineVertex(v79));
            Arc16.Vertexes.Add(new LwPolylineVertex(v102));
            Arc16.Vertexes[0].Bulge = -h / 260;
            fun.PolyFill(dxf, Arc16, 0.5, contour);
            LwPolyline Arc17 = new LwPolyline();
            Arc17.Vertexes.Add(new LwPolylineVertex(v103));
            Arc17.Vertexes.Add(new LwPolylineVertex(v102));
            Arc17.Vertexes[0].Bulge = -h / 44;
            fun.PolyFill(dxf, Arc17, 0.5, contour);
            Vector2[] Line100 = { v103, v104 };
            fun.drawBLine(dxf, Line100, 0.5, contour);
            LwPolyline Arc18 = new LwPolyline();
            Arc18.Vertexes.Add(new LwPolylineVertex(v104));
            Arc18.Vertexes.Add(new LwPolylineVertex(v105));
            Arc18.Vertexes[0].Bulge = h / 360;
            fun.PolyFill(dxf, Arc18, 0.5, contour);
            Vector2[] Line101 = { v103, v106 };
            fun.drawBLine(dxf, Line101, 0.5, contour);
            Vector2[] Line102 = { v102, v107 };
            fun.drawBLine(dxf, Line102, 0.5, contour);
            Vector2[] Line103 = { v101, v108 };
            fun.drawBLine(dxf, Line103, 0.5, contour);
            Vector2[] Line104 = { v109, v108 };
            fun.drawBLine(dxf, Line104, 0.5, contour);
            Vector2[] Line105 = { v109, v110 };
            fun.drawBLine(dxf, Line105, 0.5, contour);
            Vector2[] Line106 = { v111, v112 };
            fun.drawBLine(dxf, Line106, 0.5, contour);
            Vector2[] Line107 = { v110, v113 };
            fun.drawBLine(dxf, Line107, 0.5, contour);
            Vector2[] Line108 = { v101, v113 };
            fun.drawBLine(dxf, Line108, 0.5, contour);
            Vector2[] Line109 = { v114, v115 };
            fun.drawBLine(dxf, Line109, 0.5, contour);
            Vector2[] Line110 = { v112, v115 };
            fun.drawBLine(dxf, Line110, 0.5, contour);
            //
            //Vector2[] Line111 = { v116, v117 };
            //fun.drawBLine(dxf, Line111, 0.15, contour);
            //Vector2[] Line112 = { v118, v117 };
            //fun.drawBLine(dxf, Line112, 0.15, contour);
            //Vector2[] Line113 = { v118, v119 };
            //fun.drawBLine(dxf, Line113, 0.15, contour);
            //Vector2[] Line114 = { v116, v119 };
            //fun.drawBLine(dxf, Line114, 0.15, contour);
            //Vector2[] Line115 = { v120, v121 };
            //fun.drawBLine(dxf, Line115, 0.08, skdimensioning);
            //
            //LwPolyline Arc19 = new LwPolyline();
            //Arc19.Vertexes.Add(new LwPolylineVertex(v48));
            //Arc19.Vertexes.Add(new LwPolylineVertex(v122));
            //Arc19.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc19, 0.08, refin);
            //LwPolyline Arc20 = new LwPolyline();
            //Arc20.Vertexes.Add(new LwPolylineVertex(v52));
            //Arc20.Vertexes.Add(new LwPolylineVertex(v123));
            //Arc20.Vertexes[0].Bulge = h / 300;
            //fun.PolyFill(dxf, Arc20, 0.08, refin);
            //LwPolyline Arc21 = new LwPolyline();
            //Arc21.Vertexes.Add(new LwPolylineVertex(v125));
            //Arc21.Vertexes.Add(new LwPolylineVertex(v124));
            //Arc21.Vertexes[0].Bulge = -h / 320;
            //fun.PolyFill(dxf, Arc21, 0.08, refin);
            ////
            //LwPolyline Arc22 = new LwPolyline();
            //Arc22.Vertexes.Add(new LwPolylineVertex(v90));
            //Arc22.Vertexes.Add(new LwPolylineVertex(v123));
            //Arc22.Vertexes[0].Bulge = -h / 400;
            //fun.PolyFill(dxf, Arc22, 0.08, refin);
            //LwPolyline Arc23 = new LwPolyline();
            //Arc23.Vertexes.Add(new LwPolylineVertex(v125));
            //Arc23.Vertexes.Add(new LwPolylineVertex(v126));
            //Arc23.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc23, 0.08, refin);
            //LwPolyline Arc24 = new LwPolyline();
            //Arc24.Vertexes.Add(new LwPolylineVertex(v71));
            //Arc24.Vertexes.Add(new LwPolylineVertex(v122));
            //Arc24.Vertexes[0].Bulge = -h / 320;
            //fun.PolyFill(dxf, Arc24, 0.08, refin);
            //LwPolyline Arc25 = new LwPolyline();
            //Arc25.Vertexes.Add(new LwPolylineVertex(v123));
            //Arc25.Vertexes.Add(new LwPolylineVertex(v127));
            //Arc25.Vertexes[0].Bulge = -h / 360;
            //fun.PolyFill(dxf, Arc25, 0.08, refin);
            //LwPolyline Arc26 = new LwPolyline();
            //Arc26.Vertexes.Add(new LwPolylineVertex(v125));
            //Arc26.Vertexes.Add(new LwPolylineVertex(v128));
            //Arc26.Vertexes[0].Bulge = -h / 360;
            //fun.PolyFill(dxf, Arc26, 0.08, refin);
            //LwPolyline Arc27 = new LwPolyline();
            //Arc27.Vertexes.Add(new LwPolylineVertex(v122));
            //Arc27.Vertexes.Add(new LwPolylineVertex(v129));
            //Arc27.Vertexes[0].Bulge = -h / 360;
            //fun.PolyFill(dxf, Arc27, 0.08, refin);
            ////
            //LwPolyline Arc28 = new LwPolyline();
            //Arc28.Vertexes.Add(new LwPolylineVertex(v123));
            //Arc28.Vertexes.Add(new LwPolylineVertex(v130));
            //Arc28.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc28, 0.08, refin);
            //LwPolyline Arc29 = new LwPolyline();
            //Arc29.Vertexes.Add(new LwPolylineVertex(v125));
            //Arc29.Vertexes.Add(new LwPolylineVertex(v131));
            //Arc29.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc29, 0.08, refin);
            //LwPolyline Arc30 = new LwPolyline();
            //Arc30.Vertexes.Add(new LwPolylineVertex(v122));
            //Arc30.Vertexes.Add(new LwPolylineVertex(v132));
            //Arc30.Vertexes[0].Bulge = h / 400;
            //fun.PolyFill(dxf, Arc30, 0.08, refin);
            //Vector2[] Line116 = { v130, v133 };
            //fun.drawPlinetype(dxf, Line116, refin, Linetype.Dashed);
            //Vector2[] Line117 = { v131, v134 };
            //fun.drawPlinetype(dxf, Line117, refin, Linetype.Dashed);
            //Vector2[] Line118 = { v132, v135 };
            //fun.drawPlinetype(dxf, Line118, refin, Linetype.Dashed);
            //
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v1.X - h / 6, v1.Y), new Vector2(v1.X + l1, v1.Y) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v27.X - h / 1.6, v27.Y + h / 22), new Vector2(v19.X + h + h / 6.8, v19.Y - h / 26) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v28.X - h / 1.6, v28.Y - h / 22), new Vector2(v18.X + h + h / 6.8, v18.Y + h / 26) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v49.X, v49.Y - h / 16), new Vector2(v49.X, v49.Y + h + h / 3.8) }, centre, Linetype.Center);
            //DimensionStyle dimensionStyle = fun.CreateDimStyle();
            //dimensionStyle.ArrowSize = 1;
            //dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.TextHeight = 0.8;
            //double offset = 6;
            //LinearDimension dim1 = new LinearDimension(new Line(v6, v7), offset * 3, 90, dimensionStyle);
            //dim1.UserText = "Φ25 ";
            //dxf.AddEntity(dim1);
            //LinearDimension dim2 = new LinearDimension(new Line(v32, v33), offset * 14, 90, dimensionStyle);
            //dim2.UserText = "Φ32 ";
            //dxf.AddEntity(dim2);
            //LinearDimension dim3 = new LinearDimension(new Line(v112, v113), offset * 3, 270, dimensionStyle);
            //dim3.UserText = "Φ21 ";
            //dxf.AddEntity(dim3);
            //LinearDimension dim4 = new LinearDimension(new Line(v70, v113), offset * 3, 360, dimensionStyle);
            //dim4.UserText = "105 ";
            //dxf.AddEntity(dim4);
            //LinearDimension dim5 = new LinearDimension(new Line(v32, v113), offset * 5, 360, dimensionStyle);
            //dim5.UserText = "125 ";
            //dxf.AddEntity(dim5);
            //LinearDimension dim6 = new LinearDimension(new Line(v7, v32), offset * 8, 360, dimensionStyle);
            //dim6.UserText = "56 ";
            //dxf.AddEntity(dim6);
            //
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint42(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 25;
            double pi = Math.PI;
            double epsr = 140 * pi / 180;
            double h1 = 32;
            double h3 = 21;
            double l1 = 56;
            double l2 = 125;
            double l3 = 105;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h / 4);
            Vector2 v3 = new Vector2(v1.X, v1.Y - h / 4);
            //
            Vector2 v4 = new Vector2(v2.X, v2.Y + h / 4);
            Vector2 v5 = new Vector2(v3.X, v3.Y - h / 4);
            //
            Vector2 v6 = new Vector2(v4.X + h / 10, v4.Y + h / 8);
            Vector2 v7 = new Vector2(v5.X + h / 10, v5.Y - h / 8);
            //
            Vector2 v8 = new Vector2(v6.X, v6.Y - h / 3);
            Vector2 v9 = new Vector2(v1.X, v8.Y - h / 10);
            //
            Vector2 v10 = new Vector2(v7.X, v7.Y + h / 3);
            Vector2 v11 = new Vector2(v1.X, v10.Y + h / 10);
            //
            Vector2 v12 = new Vector2(v6.X + l1 - h / 10, v6.Y);
            Vector2 v13 = new Vector2(v7.X + l1 - h / 10, v7.Y);
            //
            Vector2 v14 = new Vector2(v8.X + l1 - h / 2.6, v8.Y);
            Vector2 v15 = new Vector2(v10.X + l1 - h / 2.6, v10.Y);
            //
            Vector2 v16 = new Vector2(v8.X + h / 16, v8.Y);
            Vector2 v17 = new Vector2(v10.X + h / 16, v10.Y);
            Vector2 v18 = new Vector2(v17.X + (l1 - h / 2.6) / 2, v17.Y);
            Vector2 v19 = new Vector2(v16.X + (l1 - h / 2.6) / 2, v16.Y);
            Vector2 v20 = new Vector2(v18.X + h / 10, v1.Y);
            Vector2 v21 = new Vector2(v19.X + h / 10, v1.Y);
            //
            Vector2 v22 = new Vector2(v14.X + h / 22, v14.Y - h / 18);
            Vector2 v23 = new Vector2(v15.X + h / 22, v15.Y + h / 18);
            //
            Vector2 v24 = new Vector2(v14.X + (l1 - h / 10) - (l1 - h / 2.6) + h / 16, v14.Y);
            Vector2 v25 = new Vector2(v15.X + (l1 - h / 10) - (l1 - h / 2.6) + h / 16, v15.Y);
            Vector2 v26 = new Vector2(v24.X, v24.Y - h / 12);
            Vector2 v27 = new Vector2(v19.X + h / 30, v19.Y - h / 12);
            //
            Vector2 v28 = new Vector2(v18.X + h / 30, v18.Y + h / 12);
            Vector2 v29 = new Vector2(v25.X, v25.Y + h / 12);
            //
            Vector2 v30 = new Vector2(v1.X, v16.Y + h / 8);
            Vector2 v31 = new Vector2(v1.X, v17.Y - h / 8);
            //第二阶段
            Vector2 v32 = new Vector2(v12.X, v12.Y + (h1 - h));
            Vector2 v33 = new Vector2(v13.X, v13.Y - (h1 - h));
            //圆弧里得斜坡(上）
            Vector2 v34 = new Vector2(v19.X + h + h / 6.8 + h / 30, v19.Y - h / 26);
            Vector2 v35 = new Vector2(v19.X + h + h / 6.8, v27.Y);
            //
            Vector2 v36 = new Vector2(v34.X, v34.Y + h / 16);
            //
            Vector2 v37 = new Vector2(v19.X + h + h / 6.8 + h / 30, v25.Y + h / 26);
            Vector2 v38 = new Vector2(v19.X + h + h / 6.8, v29.Y);
            //
            Vector2 v39 = new Vector2(v37.X, v33.Y - h / 26);
            //
            Vector2 v40 = new Vector2(v29.X, v23.Y + h + h / 22);
            Vector2 v41 = new Vector2(v29.X, v25.Y - h / 20);
            //
            Vector2 v42 = new Vector2(v39.X + (l2 - l3) / 2, v39.Y);
            //
            Vector2 v43 = new Vector2(v42.X, v37.Y);
            //
            Vector2 v44 = new Vector2(v41.X + ((l2 - l3) / 2) * 2.3 / 3, v41.Y);
            Vector2 v45 = new Vector2(v44.X, v25.Y);
            Vector2 v46 = new Vector2(v45.X - h / 36, v37.Y);
            Vector2 v47 = new Vector2(v45.X, v37.Y);
            Vector2 v48 = new Vector2(v42.X, v25.Y);
            //
            Vector2 v49 = new Vector2(v41.X + (((l2 - l3) / 2) * 2.3 / 3) / 2, v41.Y - h / 16);
            Vector2 v50 = new Vector2(v44.X - (((l2 - l3) / 2) * 2.3 / 3) / 2, v44.Y - h / 16);
            //
            Vector2 v51 = new Vector2(v46.X + h / 36, v46.Y + h / 26);
            Vector2 v52 = new Vector2(v42.X, v51.Y);
            //
            Vector2 v53 = new Vector2(v32.X + (l2 - l3) / 2, v32.Y);
            Vector2 v54 = new Vector2(v53.X, v12.Y - h / 3.6);
            Vector2 v55 = new Vector2(v54.X - h / 2.707, v54.Y);
            Vector2 v56 = new Vector2(v55.X, v55.Y - h / 32);
            //
            Vector2 v57 = new Vector2(v32.X + (l2 - l3) / 6, v32.Y);
            Vector2 v58 = new Vector2(v57.X, v57.Y - h / 6);
            Vector2 v59 = new Vector2(v32.X + (l2 - l3) / 2.6, v32.Y);
            Vector2 v60 = new Vector2(v59.X, v57.Y - h / 6);
            Vector2 v61 = new Vector2(v49.X, v60.Y - h / 20);
            //
            Vector2 v62 = new Vector2(v54.X - h / 12, v54.Y);
            Vector2 v63 = new Vector2(v62.X - h / 20, v62.Y - h / 10.5);
            //
            Vector2 v64 = new Vector2(v62.X + h / 8, v62.Y - h / 20);
            Vector2 v65 = new Vector2(v54.X, v54.Y - h / 36);
            //
            Vector2 v66 = new Vector2(v51.X, v51.Y + h / 2.4);
            //
            Vector2 v67 = new Vector2(v66.X, v66.Y - (h / 2.4) / 2.3);
            //
            Vector2 v68 = new Vector2(v64.X + ((l2 - l3) / 2) * 2 / 3, v64.Y);
            Vector2 v69 = new Vector2(v68.X, v68.Y + (h1 - h));
            Vector2 v70 = new Vector2(v68.X + ((l2 - l3) / 2) * 1 / 3, v68.Y);
            //
            Vector2 v71 = new Vector2(v66.X, v66.Y + h / 8.3);
            //
            Vector2 v72 = new Vector2(v66.X - h / 26, v66.Y - (h / 2.4) / 3.2);
            Vector2 v73 = new Vector2(v48.X, v48.Y + h / 24);
            //
            Vector2 v74 = new Vector2(v73.X + (((l2 - l3) / 2) * 2.3 / 3.3) / 1.8, v73.Y - (((l2 - l3) / 2) * 2.3 / 3) / 2.6);
            //上半
            Vector2 v75 = new Vector2(v53.X + h / 36, v53.Y);
            Vector2 v76 = new Vector2(v75.X + ((l2 - l3) / 2) * 2.8 / 3.2, v75.Y - ((l2 - l3) / 2) * 2.6 / 3.6);
            Vector2 v77 = new Vector2(v76.X, v76.Y - h / 7);
            Vector2 v78 = new Vector2(v76.X + h / 8, v76.Y - h / 30);
            //
            Vector2 v79 = new Vector2(v78.X + l3 / 3, v78.Y);
            Vector2 v80 = new Vector2(v78.X, v78.Y - h / 3.2);
            //
            Vector2 v81 = new Vector2(v42.X + ((l2 - l3) / 2) * 2.8 / 3.2, v42.Y + ((l2 - l3) / 2) * 2.6 / 3.6);
            Vector2 v82 = new Vector2(v81.X + h / 8, v81.Y + h / 30);
            Vector2 v83 = new Vector2(v82.X + l3 / 3, v82.Y);
            Vector2 v84 = new Vector2(v81.X, v81.Y + h / 4);
            Vector2 v85 = new Vector2(v82.X, v82.Y + h / 4.7);
            //中间
            Vector2 v86 = new Vector2(v67.X + h / 4, v67.Y - h / 4);
            Vector2 v87 = new Vector2(v86.X, v86.Y - h / 6.3);
            Vector2 v88 = new Vector2(v86.X + h / 12, v86.Y - h / 16);
            Vector2 v89 = new Vector2(v88.X + h / 20, v88.Y + h / 2.1);
            Vector2 v90 = new Vector2(v89.X - h / 36, v89.Y);
            Vector2 v91 = new Vector2(v90.X, v90.Y + h / 8);
            Vector2 v92 = new Vector2(v90.X - h / 10, v90.Y + h / 9);
            Vector2 v93 = new Vector2(v89.X + h / 36, v89.Y + h / 9);
            //
            Vector2 v94 = new Vector2(v90.X - h / 5, v90.Y - h / 3.1);
            Vector2 v95 = new Vector2(v90.X - h / 3, v90.Y);
            //下边
            Vector2 v96 = new Vector2(v85.X + l3 * 2 / 3, v85.Y - h / 36);
            Vector2 v97 = new Vector2(v88.X + l3 * 2 / 2.9, v85.Y);
            //
            Vector2 v98 = new Vector2(v90.X + l3 / 4.6, v90.Y - h / 10);
            //
            Vector2 v99 = new Vector2(v96.X + l3 / 3 - l3 / 8, v96.Y - h / 6);
            Vector2 v100 = new Vector2(v99.X + l3 / 8, v99.Y);
            //
            Vector2 v101 = new Vector2(v79.X + l3 * 2 / 3, v79.Y + h / 80);
            Vector2 v102 = new Vector2(v101.X - l2 / 9, v1.Y + h / 6);
            Vector2 v103 = new Vector2(v102.X + h / 6, v102.Y + h / 8);
            Vector2 v104 = new Vector2(v103.X - h / 26, v101.Y);
            Vector2 v105 = new Vector2(v101.X - l2 / 3.2, v1.Y + h / 2.15);
            Vector2 v106 = new Vector2(v103.X - h / 1.9, v103.Y);
            Vector2 v107 = new Vector2(v102.X, v102.Y + h / 8);
            //
            Vector2 v108 = new Vector2(v101.X + h / 22, v101.Y - h / 3.2);
            Vector2 v109 = new Vector2(v108.X - h / 3, v108.Y - h / 30);
            Vector2 v110 = new Vector2(v109.X - h / 24, v101.Y);
            //下底右边
            Vector2 v111 = new Vector2(v108.X - h / 23, v108.Y - h / 200);
            Vector2 v112 = new Vector2(v111.X, v111.Y - h3 - h / 28);
            //上侧斜边
            Vector2 v113 = new Vector2(v110.X + h / 3.07, v110.Y + h / 40);
            //
            Vector2 v114 = new Vector2(v111.X - (h / 23) * 1.3, v111.Y - (h / 200) * 1.3);
            Vector2 v115 = new Vector2(v114.X, v114.Y - h3 / 1.2);
            //
            Vector2 v116 = new Vector2(v101.X + h / 40, v115.Y + h / 5.6);
            Vector2 v117 = new Vector2(v108.X - h / 3.1, v116.Y - h / 30);
            Vector2 v118 = new Vector2(v109.X - h / 40, v117.Y + h / 3.5);
            Vector2 v119 = new Vector2(v110.X + h / 3.1, v118.Y + h / 40);
            //虚线段
            Vector2 v120 = new Vector2(v1.X + l1, v1.Y);
            Vector2 v121 = new Vector2(v120.X + l2 + h / 3, v120.Y);
            //*/
            Vector2 v122 = new Vector2(v120.X + l2 / 1.2, v120.Y);
            Vector2 v123 = new Vector2(v120.X + l2 / 1.6, v120.Y);
            Vector2 v124 = new Vector2(v52.X, v37.Y);
            Vector2 v125 = new Vector2(v120.X + l2 / 1.4, v120.Y);
            //
            Vector2 v126 = new Vector2(v89.X - h / 36, v89.Y + h / 20);
            Vector2 v127 = new Vector2(v123.X + h * 1.59, v123.Y + h / 3.7);
            //
            Vector2 v128 = new Vector2(v127.X + h / 9, v123.Y + h / 4);
            Vector2 v129 = new Vector2(v128.X + h / 3.5, v128.Y - h / 10);
            //
            Vector2 v130 = new Vector2(v123.X + h * 1.3, v1.Y - h / 5);
            Vector2 v131 = new Vector2(v123.X + h * 1.3, v1.Y - h / 7);
            Vector2 v132 = new Vector2(v123.X + h * 1.3, v1.Y - h / 20);
            //
            Vector2 v133 = new Vector2(v130.X + h / 1.44, v130.Y + h / 16);
            Vector2 v134 = new Vector2(v131.X + h / 1.46, v131.Y + h / 16);
            Vector2 v135 = new Vector2(v132.X + h / 1.46, v132.Y + h / 16);
            //线段
            //主视图
            //Vector2[] Line1 = { v1, v2 };
            //fun.drawBLine(dxf, Line1, 0.15, contour);
            //Vector2[] Line2 = { v1, v3 };
            //fun.drawBLine(dxf, Line2, 0.15, contour);
            //Vector2[] Line3 = { v2, v4 };
            //fun.drawBLine(dxf, Line3, 0.15, contour);
            //Vector2[] Line4 = { v3, v5 };
            //fun.drawBLine(dxf, Line4, 0.15, contour);
            //Vector2[] Line5 = { v4, v6 };
            //fun.drawBLine(dxf, Line5, 0.15, contour);
            //Vector2[] Line6 = { v5, v7 };
            //fun.drawBLine(dxf, Line6, 0.15, contour);
            //Vector2[] Line7 = { v6, v8 };
            //fun.drawBLine(dxf, Line7, 0.15, contour);
            ////
            //Vector2[] Line8 = { v9, v8 };
            //fun.drawBLine(dxf, Line8, 0.15, contour);
            ////
            //Vector2[] Line9 = { v7, v10 };
            //fun.drawBLine(dxf, Line9, 0.15, contour);
            //Vector2[] Line10 = { v11, v10 };
            //fun.drawBLine(dxf, Line10, 0.15, contour);
            ////
            //Vector2[] Line11 = { v12, v6 };
            //fun.drawBLine(dxf, Line11, 0.15, contour);
            //Vector2[] Line12 = { v13, v7 };
            //fun.drawBLine(dxf, Line12, 0.15, contour);
            //Vector2[] Line13 = { v13, v12 };
            //fun.drawBLine(dxf, Line13, 0.15, contour);
            ////
            //Vector2[] Line14 = { v14, v8 };
            //fun.drawBLine(dxf, Line14, 0.15, contour);
            //Vector2[] Line15 = { v14, v15 };
            //fun.drawBLine(dxf, Line15, 0.15, contour);
            //Vector2[] Line16 = { v15, v10 };
            //fun.drawBLine(dxf, Line16, 0.15, contour);
            ////
            //Vector2[] Line17 = { v17, v16 };
            //fun.drawPlinetype(dxf, Line17, refin, Linetype.Dashed);
            //Vector2[] Line18 = { v17, v18 };
            //fun.drawPlinetype(dxf, Line18, refin, Linetype.Dashed);
            //Vector2[] Line19 = { v16, v19 };
            //fun.drawPlinetype(dxf, Line19, refin, Linetype.Dashed);
            //Vector2[] Line20 = { v18, v19 };
            //fun.drawPlinetype(dxf, Line20, refin, Linetype.Dashed);
            //Vector2[] Line21 = { v18, v20 };
            //fun.drawPlinetype(dxf, Line21, refin, Linetype.Dashed);
            //Vector2[] Line22 = { v19, v21 };
            //fun.drawPlinetype(dxf, Line22, refin, Linetype.Dashed);
            ////
            //Vector2[] Line23 = { v14, v22 };
            //fun.drawBLine(dxf, Line23, 0.15, contour);
            //Vector2[] Line24 = { v15, v23 };
            //fun.drawBLine(dxf, Line24, 0.15, contour);
            //Vector2[] Line25 = { v22, v23 };
            //fun.drawBLine(dxf, Line25, 0.15, contour);
            //Vector2[] Line26 = { v14, v24 };
            //fun.drawPlinetype(dxf, Line26, refin, Linetype.Dashed);
            //Vector2[] Line27 = { v15, v25 };
            //fun.drawPlinetype(dxf, Line27, refin, Linetype.Dashed);
            //Vector2[] Line28 = { v26, v27 };
            //fun.drawPlinetype(dxf, Line28, refin, Linetype.Dashed);
            //Vector2[] Line29 = { v28, v29 };
            //fun.drawPlinetype(dxf, Line29, refin, Linetype.Dashed);
            //LwPolyline Arc1 = new LwPolyline();
            //Arc1.Vertexes.Add(new LwPolylineVertex(v24));
            //Arc1.Vertexes.Add(new LwPolylineVertex(v26));
            //Arc1.Vertexes[0].Bulge = -h / 36;
            //fun.PolyFill(dxf, Arc1, 0.08, refin);
            //LwPolyline Arc2 = new LwPolyline();
            //Arc2.Vertexes.Add(new LwPolylineVertex(v25));
            //Arc2.Vertexes.Add(new LwPolylineVertex(v29));
            //Arc2.Vertexes[0].Bulge = h / 36;
            //fun.PolyFill(dxf, Arc2, 0.08, refin);
            //Vector2[] Line30 = { v16, v30 };
            //fun.drawBLine(dxf, Line30, 0.08, refin);
            //Vector2[] Line31 = { v17, v31 };
            //fun.drawBLine(dxf, Line31, 0.08, refin);
            ////
            //Vector2[] Line32 = { v32, v12 };
            //fun.drawBLine(dxf, Line32, 0.15, contour);
            //Vector2[] Line33 = { v33, v13 };
            //fun.drawBLine(dxf, Line33, 0.15, contour);
            //Vector2[] Line34 = { v34, v35 };
            //fun.drawBLine(dxf, Line34, 0.15, contour);
            //Vector2[] Line35 = { v34, v36 };
            //fun.drawBLine(dxf, Line35, 0.15, contour);
            //Vector2[] Line36 = { v37, v38 };
            //fun.drawBLine(dxf, Line36, 0.15, contour);
            //Vector2[] Line37 = { v39, v37 };
            //fun.drawBLine(dxf, Line37, 0.15, contour);
            //Vector2[] Line38 = { v39, v33 };
            //fun.drawBLine(dxf, Line38, 0.15, contour);
            //Vector2[] Line39 = { v26, v29 };
            //fun.drawPlinetype(dxf, Line39, refin, Linetype.Dashed);
            //Vector2[] Line40 = { v24, v40 };
            //fun.drawPlinetype(dxf, Line40, refin, Linetype.Dashed);
            //Vector2[] Line41 = { v32, v40 };
            //fun.drawPlinetype(dxf, Line41, refin, Linetype.Dashed);
            //Vector2[] Line42 = { v25, v41 };
            //fun.drawBLine(dxf, Line42, 0.08, skdimensioning);
            //Vector2[] Line43 = { v42, v39 };
            //fun.drawBLine(dxf, Line43, 0.15, contour);
            //Vector2[] Line44 = { v42, v43 };
            //fun.drawBLine(dxf, Line44, 0.15, contour);
            //Vector2[] Line45 = { v37, v43 };
            //fun.drawBLine(dxf, Line45, 0.15, contour);
            //Vector2[] Line46 = { v41, v44 };
            //fun.drawBLine(dxf, Line46, 0.08, skdimensioning);
            //Vector2[] Line47 = { v45, v44 };
            //fun.drawBLine(dxf, Line47, 0.08, skdimensioning);
            //Vector2[] Line48 = { v45, v46 };
            //fun.drawBLine(dxf, Line48, 0.08, skdimensioning);
            //Vector2[] Line49 = { v45, v47 };
            //fun.drawBLine(dxf, Line49, 0.08, skdimensioning);
            //Vector2[] Line50 = { v48, v45 };
            //fun.drawBLine(dxf, Line50, 0.08, skdimensioning);
            //Vector2[] Line51 = { v49, v41 };
            //fun.drawBLine(dxf, Line51, 0.08, skdimensioning);
            //Vector2[] Line52 = { v50, v44 };
            //fun.drawBLine(dxf, Line52, 0.08, skdimensioning);
            //Vector2[] Line53 = { v51, v46 };
            //fun.drawBLine(dxf, Line53, 0.08, skdimensioning);
            //Vector2[] Line54 = { v51, v47 };
            //fun.drawBLine(dxf, Line54, 0.08, skdimensioning);
            //Vector2[] Line55 = { v51, v52 };
            //fun.drawBLine(dxf, Line55, 0.08, skdimensioning);
            //Vector2[] Line56 = { v48, v52 };
            //fun.drawBLine(dxf, Line56, 0.08, skdimensioning);
            //Vector2[] Line57 = { v32, v53 };
            //fun.drawBLine(dxf, Line57, 0.15, contour);
            //Vector2[] Line58 = { v54, v53 };
            //fun.drawBLine(dxf, Line58, 0.15, contour);
            //Vector2[] Line59 = { v54, v55 };
            //fun.drawBLine(dxf, Line59, 0.15, contour);
            //Vector2[] Line60 = { v56, v55 };
            //fun.drawBLine(dxf, Line60, 0.15, contour);
            //Vector2[] Line61 = { v57, v58 };
            //fun.drawPlinetype(dxf, Line61, refin, Linetype.Dashed);
            //Vector2[] Line62 = { v59, v60 };
            //fun.drawPlinetype(dxf, Line62, refin, Linetype.Dashed);
            //Vector2[] Line63 = { v58, v60 };
            //fun.drawPlinetype(dxf, Line63, refin, Linetype.Dashed);
            //Vector2[] Line64 = { v61, v60 };
            //fun.drawPlinetype(dxf, Line64, refin, Linetype.Dashed);
            //Vector2[] Line65 = { v61, v58 };
            //fun.drawPlinetype(dxf, Line65, refin, Linetype.Dashed);
            //LwPolyline Arc3 = new LwPolyline();
            //Arc3.Vertexes.Add(new LwPolylineVertex(v53));
            //Arc3.Vertexes.Add(new LwPolylineVertex(v62));
            //Arc3.Vertexes[0].Bulge = h / 200;
            //fun.PolyFill(dxf, Arc3, 0.15, contour);
            //Vector2[] Line66 = { v63, v62 };
            //fun.drawBLine(dxf, Line66, 0.15, contour);
            //Vector2[] Line67 = { v34, v63 };
            //fun.drawBLine(dxf, Line67, 0.15, contour);
            //Vector2[] Line68 = { v64, v62 };
            //fun.drawBLine(dxf, Line68, 0.15, contour);
            //Vector2[] Line69 = { v65, v54 };
            //fun.drawBLine(dxf, Line69, 0.15, contour);
            //Vector2[] Line70 = { v66, v51 };
            //fun.drawBLine(dxf, Line70, 0.08, skdimensioning);
            ////
            //LwPolyline Arc4 = new LwPolyline();
            //Arc4.Vertexes.Add(new LwPolylineVertex(v63));
            //Arc4.Vertexes.Add(new LwPolylineVertex(v67));
            //Arc4.Vertexes[0].Bulge = h / 200;
            //fun.PolyFill(dxf, Arc4, 0.15, contour);
            //Vector2[] Line71 = { v64, v68 };
            //fun.drawBLine(dxf, Line71, 0.15, contour);
            //Vector2[] Line72 = { v69, v68 };
            //fun.drawBLine(dxf, Line72, 0.15, contour);
            //LwPolyline Arc5 = new LwPolyline();
            //Arc5.Vertexes.Add(new LwPolylineVertex(v53));
            //Arc5.Vertexes.Add(new LwPolylineVertex(v69));
            //Arc5.Vertexes[0].Bulge = -h / 180;
            //fun.PolyFill(dxf, Arc5, 0.15, contour);
            //Vector2[] Line73 = { v70, v68 };
            //fun.drawBLine(dxf, Line73, 0.15, contour);
            //LwPolyline Arc6 = new LwPolyline();
            //Arc6.Vertexes.Add(new LwPolylineVertex(v66));
            //Arc6.Vertexes.Add(new LwPolylineVertex(v71));
            //Arc6.Vertexes[0].Bulge = -h / 80;
            //fun.PolyFill(dxf, Arc6, 0.08, skdimensioning);
            //Vector2[] Line74 = { v71, v66 };
            //fun.drawBLine(dxf, Line74, 0.08, skdimensioning);
            //LwPolyline Arc7 = new LwPolyline();
            //Arc7.Vertexes.Add(new LwPolylineVertex(v69));
            //Arc7.Vertexes.Add(new LwPolylineVertex(v70));
            //Arc7.Vertexes[0].Bulge = -h / 200;
            //fun.PolyFill(dxf, Arc7, 0.15, contour);
            //Vector2[] Line75 = { v73, v72 };
            //fun.drawBLine(dxf, Line75, 0.15, contour);
            //Vector2[] Line76 = { v73, v74 };
            //fun.drawBLine(dxf, Line76, 0.15, contour);
            //Vector2[] Line77 = { v75, v76 };
            //fun.drawBLine(dxf, Line77, 0.15, contour);
            //Vector2[] Line78 = { v75, v53 };
            //fun.drawBLine(dxf, Line78, 0.15, contour);
            //Vector2[] Line79 = { v76, v77 };
            //fun.drawBLine(dxf, Line79, 0.15, contour);
            //LwPolyline Arc8 = new LwPolyline();
            //Arc8.Vertexes.Add(new LwPolylineVertex(v76));
            //Arc8.Vertexes.Add(new LwPolylineVertex(v78));
            //Arc8.Vertexes[0].Bulge = h / 160;
            //fun.PolyFill(dxf, Arc8, 0.15, contour);
            //Vector2[] Line80 = { v78, v79 };
            //fun.drawBLine(dxf, Line80, 0.15, contour);
            //Vector2[] Line81 = { v78, v80 };
            //fun.drawBLine(dxf, Line81, 0.15, contour);
            ////
            //Vector2[] Line82 = { v70, v80 };
            //fun.drawBLine(dxf, Line82, 0.15, contour);
            //Vector2[] Line83 = { v42, v81 };
            //fun.drawBLine(dxf, Line83, 0.15, contour);
            //LwPolyline Arc9 = new LwPolyline();
            //Arc9.Vertexes.Add(new LwPolylineVertex(v81));
            //Arc9.Vertexes.Add(new LwPolylineVertex(v82));
            //Arc9.Vertexes[0].Bulge = -h / 160;
            //fun.PolyFill(dxf, Arc9, 0.15, contour);
            //Vector2[] Line84 = { v83, v82 };
            //fun.drawBLine(dxf, Line84, 0.15, contour);
            //Vector2[] Line85 = { v84, v81 };
            //fun.drawBLine(dxf, Line85, 0.15, contour);
            //LwPolyline Arc10 = new LwPolyline();
            //Arc10.Vertexes.Add(new LwPolylineVertex(v74));
            //Arc10.Vertexes.Add(new LwPolylineVertex(v84));
            //Arc10.Vertexes[0].Bulge = h / 100;
            //fun.PolyFill(dxf, Arc10, 0.15, contour);
            //Vector2[] Line86 = { v85, v82 };
            //fun.drawBLine(dxf, Line86, 0.15, contour);
            //LwPolyline Arc11 = new LwPolyline();
            //Arc11.Vertexes.Add(new LwPolylineVertex(v85));
            //Arc11.Vertexes.Add(new LwPolylineVertex(v84));
            //Arc11.Vertexes[0].Bulge = h / 120;
            //fun.PolyFill(dxf, Arc11, 0.15, contour);
            //Vector2[] Line87 = { v86, v67 };
            //fun.drawBLine(dxf, Line87, 0.15, contour);
            //Vector2[] Line88 = { v86, v87 };
            //fun.drawBLine(dxf, Line88, 0.15, contour);
            //Vector2[] Line89 = { v86, v88 };
            //fun.drawBLine(dxf, Line89, 0.15, contour);
            //Vector2[] Line90 = { v89, v88 };
            //fun.drawBLine(dxf, Line90, 0.15, contour);
            //Vector2[] Line91 = { v89, v90 };
            //fun.drawBLine(dxf, Line91, 0.15, contour);
            //Vector2[] Line92 = { v91, v90 };
            //fun.drawBLine(dxf, Line92, 0.15, contour);
            //Vector2[] Line93 = { v92, v90 };
            //fun.drawBLine(dxf, Line93, 0.15, contour);
            //Vector2[] Line94 = { v93, v89 };
            //fun.drawBLine(dxf, Line94, 0.15, contour);
            //LwPolyline Arc12 = new LwPolyline();
            //Arc12.Vertexes.Add(new LwPolylineVertex(v90));
            //Arc12.Vertexes.Add(new LwPolylineVertex(v94));
            //Arc12.Vertexes[0].Bulge = h / 80;
            //fun.PolyFill(dxf, Arc12, 0.15, contour);
            //Vector2[] Line95 = { v90, v95 };
            //fun.drawPlinetype(dxf, Line95, refin, Linetype.Dashed);
            //LwPolyline Arc13 = new LwPolyline();
            //Arc13.Vertexes.Add(new LwPolylineVertex(v85));
            //Arc13.Vertexes.Add(new LwPolylineVertex(v96));
            //Arc13.Vertexes[0].Bulge = h / 180;
            //fun.PolyFill(dxf, Arc13, 0.15, contour);
            //LwPolyline Arc14 = new LwPolyline();
            //Arc14.Vertexes.Add(new LwPolylineVertex(v88));
            //Arc14.Vertexes.Add(new LwPolylineVertex(v97));
            //Arc14.Vertexes[0].Bulge = h / 160;
            //fun.PolyFill(dxf, Arc14, 0.15, contour);
            //Vector2[] Line96 = { v96, v80 };
            //fun.drawBLine(dxf, Line96, 0.15, contour);
            //Vector2[] Line97 = { v98, v90 };
            //fun.drawBLine(dxf, Line97, 0.15, contour);
            //LwPolyline Arc15 = new LwPolyline();
            //Arc15.Vertexes.Add(new LwPolylineVertex(v96));
            //Arc15.Vertexes.Add(new LwPolylineVertex(v99));
            //Arc15.Vertexes[0].Bulge = h / 260;
            //fun.PolyFill(dxf, Arc15, 0.15, contour);
            //Vector2[] Line98 = { v100, v99 };
            //fun.drawBLine(dxf, Line98, 0.15, contour);
            //Vector2[] Line99 = { v101, v79 };
            //fun.drawBLine(dxf, Line99, 0.07, contour);
            //LwPolyline Arc16 = new LwPolyline();
            //Arc16.Vertexes.Add(new LwPolylineVertex(v79));
            //Arc16.Vertexes.Add(new LwPolylineVertex(v102));
            //Arc16.Vertexes[0].Bulge = -h / 260;
            //fun.PolyFill(dxf, Arc16, 0.15, contour);
            //LwPolyline Arc17 = new LwPolyline();
            //Arc17.Vertexes.Add(new LwPolylineVertex(v103));
            //Arc17.Vertexes.Add(new LwPolylineVertex(v102));
            //Arc17.Vertexes[0].Bulge = -h / 44;
            //fun.PolyFill(dxf, Arc17, 0.15, contour);
            //Vector2[] Line100 = { v103, v104 };
            //fun.drawBLine(dxf, Line100, 0.15, contour);
            //LwPolyline Arc18 = new LwPolyline();
            //Arc18.Vertexes.Add(new LwPolylineVertex(v104));
            //Arc18.Vertexes.Add(new LwPolylineVertex(v105));
            //Arc18.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc18, 0.15, contour);
            //Vector2[] Line101 = { v103, v106 };
            //fun.drawBLine(dxf, Line101, 0.15, contour);
            //Vector2[] Line102 = { v102, v107 };
            //fun.drawBLine(dxf, Line102, 0.15, contour);
            //Vector2[] Line103 = { v101, v108 };
            //fun.drawBLine(dxf, Line103, 0.15, contour);
            //Vector2[] Line104 = { v109, v108 };
            //fun.drawBLine(dxf, Line104, 0.15, contour);
            //Vector2[] Line105 = { v109, v110 };
            //fun.drawBLine(dxf, Line105, 0.15, contour);
            //Vector2[] Line106 = { v111, v112 };
            //fun.drawBLine(dxf, Line106, 0.2, contour);
            //Vector2[] Line107 = { v110, v113 };
            //fun.drawBLine(dxf, Line107, 0.15, contour);
            //Vector2[] Line108 = { v101, v113 };
            //fun.drawBLine(dxf, Line108, 0.15, contour);
            //Vector2[] Line109 = { v114, v115 };
            //fun.drawBLine(dxf, Line109, 0.15, contour);
            //Vector2[] Line110 = { v112, v115 };
            //fun.drawBLine(dxf, Line110, 0.15, contour);
            ////
            //Vector2[] Line111 = { v116, v117 };
            //fun.drawBLine(dxf, Line111, 0.15, contour);
            //Vector2[] Line112 = { v118, v117 };
            //fun.drawBLine(dxf, Line112, 0.15, contour);
            //Vector2[] Line113 = { v118, v119 };
            //fun.drawBLine(dxf, Line113, 0.15, contour);
            //Vector2[] Line114 = { v116, v119 };
            //fun.drawBLine(dxf, Line114, 0.15, contour);
            //Vector2[] Line115 = { v120, v121 };
            //fun.drawBLine(dxf, Line115, 0.08, skdimensioning);
            ////
            //LwPolyline Arc19 = new LwPolyline();
            //Arc19.Vertexes.Add(new LwPolylineVertex(v48));
            //Arc19.Vertexes.Add(new LwPolylineVertex(v122));
            //Arc19.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc19, 0.08, refin);
            //LwPolyline Arc20 = new LwPolyline();
            //Arc20.Vertexes.Add(new LwPolylineVertex(v52));
            //Arc20.Vertexes.Add(new LwPolylineVertex(v123));
            //Arc20.Vertexes[0].Bulge = h / 300;
            //fun.PolyFill(dxf, Arc20, 0.08, refin);
            //LwPolyline Arc21 = new LwPolyline();
            //Arc21.Vertexes.Add(new LwPolylineVertex(v125));
            //Arc21.Vertexes.Add(new LwPolylineVertex(v124));
            //Arc21.Vertexes[0].Bulge = -h / 320;
            //fun.PolyFill(dxf, Arc21, 0.08, refin);
            ////
            //LwPolyline Arc22 = new LwPolyline();
            //Arc22.Vertexes.Add(new LwPolylineVertex(v90));
            //Arc22.Vertexes.Add(new LwPolylineVertex(v123));
            //Arc22.Vertexes[0].Bulge = -h / 400;
            //fun.PolyFill(dxf, Arc22, 0.08, refin);
            //LwPolyline Arc23 = new LwPolyline();
            //Arc23.Vertexes.Add(new LwPolylineVertex(v125));
            //Arc23.Vertexes.Add(new LwPolylineVertex(v126));
            //Arc23.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc23, 0.08, refin);
            //LwPolyline Arc24 = new LwPolyline();
            //Arc24.Vertexes.Add(new LwPolylineVertex(v71));
            //Arc24.Vertexes.Add(new LwPolylineVertex(v122));
            //Arc24.Vertexes[0].Bulge = -h / 320;
            //fun.PolyFill(dxf, Arc24, 0.08, refin);
            //LwPolyline Arc25 = new LwPolyline();
            //Arc25.Vertexes.Add(new LwPolylineVertex(v123));
            //Arc25.Vertexes.Add(new LwPolylineVertex(v127));
            //Arc25.Vertexes[0].Bulge = -h / 360;
            //fun.PolyFill(dxf, Arc25, 0.08, refin);
            //LwPolyline Arc26 = new LwPolyline();
            //Arc26.Vertexes.Add(new LwPolylineVertex(v125));
            //Arc26.Vertexes.Add(new LwPolylineVertex(v128));
            //Arc26.Vertexes[0].Bulge = -h / 360;
            //fun.PolyFill(dxf, Arc26, 0.08, refin);
            //LwPolyline Arc27 = new LwPolyline();
            //Arc27.Vertexes.Add(new LwPolylineVertex(v122));
            //Arc27.Vertexes.Add(new LwPolylineVertex(v129));
            //Arc27.Vertexes[0].Bulge = -h / 360;
            //fun.PolyFill(dxf, Arc27, 0.08, refin);
            ////
            //LwPolyline Arc28 = new LwPolyline();
            //Arc28.Vertexes.Add(new LwPolylineVertex(v123));
            //Arc28.Vertexes.Add(new LwPolylineVertex(v130));
            //Arc28.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc28, 0.08, refin);
            //LwPolyline Arc29 = new LwPolyline();
            //Arc29.Vertexes.Add(new LwPolylineVertex(v125));
            //Arc29.Vertexes.Add(new LwPolylineVertex(v131));
            //Arc29.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc29, 0.08, refin);
            //LwPolyline Arc30 = new LwPolyline();
            //Arc30.Vertexes.Add(new LwPolylineVertex(v122));
            //Arc30.Vertexes.Add(new LwPolylineVertex(v132));
            //Arc30.Vertexes[0].Bulge = h / 400;
            //fun.PolyFill(dxf, Arc30, 0.08, refin);
            //Vector2[] Line116 = { v130, v133 };
            //fun.drawPlinetype(dxf, Line116, refin, Linetype.Dashed);
            //Vector2[] Line117 = { v131, v134 };
            //fun.drawPlinetype(dxf, Line117, refin, Linetype.Dashed);
            //Vector2[] Line118 = { v132, v135 };
            //fun.drawPlinetype(dxf, Line118, refin, Linetype.Dashed);
            ////
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v1.X - h / 6, v1.Y), new Vector2(v1.X + l1, v1.Y) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v27.X - h / 1.6, v27.Y + h / 22), new Vector2(v19.X + h + h / 6.8, v19.Y - h / 26) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v28.X - h / 1.6, v28.Y - h / 22), new Vector2(v18.X + h + h / 6.8, v18.Y + h / 26) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v49.X, v49.Y - h / 16), new Vector2(v49.X, v49.Y + h + h / 3.8) }, centre, Linetype.Center);
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 1;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 0.8;
            double offset = 6;
            //LinearDimension dim1 = new LinearDimension(new Line(v6, v7), offset * 3, 90, dimensionStyle);
            //dim1.UserText = "Φ25 ";
            //dxf.AddEntity(dim1);
            //LinearDimension dim2 = new LinearDimension(new Line(v32, v33), offset * 14, 90, dimensionStyle);
            //dim2.UserText = "Φ32 ";
            //dxf.AddEntity(dim2);
            LinearDimension dim3 = new LinearDimension(new Line(v112, v113), offset * 3, 270, dimensionStyle);
            dim3.UserText = "Φ21 ";
            dxf.AddEntity(dim3);
            LinearDimension dim4 = new LinearDimension(new Line(v70, v113), offset * 3, 360, dimensionStyle);
            dim4.UserText = "105 ";
            dxf.AddEntity(dim4);
            LinearDimension dim5 = new LinearDimension(new Line(v32, v113), offset * 5, 360, dimensionStyle);
            dim5.UserText = "125 ";
            dxf.AddEntity(dim5);
            //LinearDimension dim6 = new LinearDimension(new Line(v7, v32), offset * 8, 360, dimensionStyle);
            //dim6.UserText = "56 ";
            //dxf.AddEntity(dim6);
            //
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint43(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 25;
            double pi = Math.PI;
            double epsr = 140 * pi / 180;
            double h1 = 32;
            double h3 = 21;
            double l1 = 56;
            double l2 = 125;
            double l3 = 105;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h / 4);
            Vector2 v3 = new Vector2(v1.X, v1.Y - h / 4);
            //
            Vector2 v4 = new Vector2(v2.X, v2.Y + h / 4);
            Vector2 v5 = new Vector2(v3.X, v3.Y - h / 4);
            //
            Vector2 v6 = new Vector2(v4.X + h / 10, v4.Y + h / 8);
            Vector2 v7 = new Vector2(v5.X + h / 10, v5.Y - h / 8);
            //
            Vector2 v8 = new Vector2(v6.X, v6.Y - h / 3);
            Vector2 v9 = new Vector2(v1.X, v8.Y - h / 10);
            //
            Vector2 v10 = new Vector2(v7.X, v7.Y + h / 3);
            Vector2 v11 = new Vector2(v1.X, v10.Y + h / 10);
            //
            Vector2 v12 = new Vector2(v6.X + l1 - h / 10, v6.Y);
            Vector2 v13 = new Vector2(v7.X + l1 - h / 10, v7.Y);
            //
            Vector2 v14 = new Vector2(v8.X + l1 - h / 2.6, v8.Y);
            Vector2 v15 = new Vector2(v10.X + l1 - h / 2.6, v10.Y);
            //
            Vector2 v16 = new Vector2(v8.X + h / 16, v8.Y);
            Vector2 v17 = new Vector2(v10.X + h / 16, v10.Y);
            Vector2 v18 = new Vector2(v17.X + (l1 - h / 2.6) / 2, v17.Y);
            Vector2 v19 = new Vector2(v16.X + (l1 - h / 2.6) / 2, v16.Y);
            Vector2 v20 = new Vector2(v18.X + h / 10, v1.Y);
            Vector2 v21 = new Vector2(v19.X + h / 10, v1.Y);
            //
            Vector2 v22 = new Vector2(v14.X + h / 22, v14.Y - h / 18);
            Vector2 v23 = new Vector2(v15.X + h / 22, v15.Y + h / 18);
            //
            Vector2 v24 = new Vector2(v14.X + (l1 - h / 10) - (l1 - h / 2.6) + h / 16, v14.Y);
            Vector2 v25 = new Vector2(v15.X + (l1 - h / 10) - (l1 - h / 2.6) + h / 16, v15.Y);
            Vector2 v26 = new Vector2(v24.X, v24.Y - h / 12);
            Vector2 v27 = new Vector2(v19.X + h / 30, v19.Y - h / 12);
            //
            Vector2 v28 = new Vector2(v18.X + h / 30, v18.Y + h / 12);
            Vector2 v29 = new Vector2(v25.X, v25.Y + h / 12);
            //
            Vector2 v30 = new Vector2(v1.X, v16.Y + h / 8);
            Vector2 v31 = new Vector2(v1.X, v17.Y - h / 8);
            //第二阶段
            Vector2 v32 = new Vector2(v12.X, v12.Y + (h1 - h));
            Vector2 v33 = new Vector2(v13.X, v13.Y - (h1 - h));
            //圆弧里得斜坡(上）
            Vector2 v34 = new Vector2(v19.X + h + h / 6.8 + h / 30, v19.Y - h / 26);
            Vector2 v35 = new Vector2(v19.X + h + h / 6.8, v27.Y);
            //
            Vector2 v36 = new Vector2(v34.X, v34.Y + h / 16);
            //
            Vector2 v37 = new Vector2(v19.X + h + h / 6.8 + h / 30, v25.Y + h / 26);
            Vector2 v38 = new Vector2(v19.X + h + h / 6.8, v29.Y);
            //
            Vector2 v39 = new Vector2(v37.X, v33.Y - h / 26);
            //
            Vector2 v40 = new Vector2(v29.X, v23.Y + h + h / 22);
            Vector2 v41 = new Vector2(v29.X, v25.Y - h / 20);
            //
            Vector2 v42 = new Vector2(v39.X + (l2 - l3) / 2, v39.Y);
            //
            Vector2 v43 = new Vector2(v42.X, v37.Y);
            //
            Vector2 v44 = new Vector2(v41.X + ((l2 - l3) / 2) * 2.3 / 3, v41.Y);
            Vector2 v45 = new Vector2(v44.X, v25.Y);
            Vector2 v46 = new Vector2(v45.X - h / 36, v37.Y);
            Vector2 v47 = new Vector2(v45.X, v37.Y);
            Vector2 v48 = new Vector2(v42.X, v25.Y);
            //
            Vector2 v49 = new Vector2(v41.X + (((l2 - l3) / 2) * 2.3 / 3) / 2, v41.Y - h / 16);
            Vector2 v50 = new Vector2(v44.X - (((l2 - l3) / 2) * 2.3 / 3) / 2, v44.Y - h / 16);
            //
            Vector2 v51 = new Vector2(v46.X + h / 36, v46.Y + h / 26);
            Vector2 v52 = new Vector2(v42.X, v51.Y);
            //
            Vector2 v53 = new Vector2(v32.X + (l2 - l3) / 2, v32.Y);
            Vector2 v54 = new Vector2(v53.X, v12.Y - h / 3.6);
            Vector2 v55 = new Vector2(v54.X - h / 2.707, v54.Y);
            Vector2 v56 = new Vector2(v55.X, v55.Y - h / 32);
            //
            Vector2 v57 = new Vector2(v32.X + (l2 - l3) / 6, v32.Y);
            Vector2 v58 = new Vector2(v57.X, v57.Y - h / 6);
            Vector2 v59 = new Vector2(v32.X + (l2 - l3) / 2.6, v32.Y);
            Vector2 v60 = new Vector2(v59.X, v57.Y - h / 6);
            Vector2 v61 = new Vector2(v49.X, v60.Y - h / 20);
            //
            Vector2 v62 = new Vector2(v54.X - h / 12, v54.Y);
            Vector2 v63 = new Vector2(v62.X - h / 20, v62.Y - h / 10.5);
            //
            Vector2 v64 = new Vector2(v62.X + h / 8, v62.Y - h / 20);
            Vector2 v65 = new Vector2(v54.X, v54.Y - h / 36);
            //
            Vector2 v66 = new Vector2(v51.X, v51.Y + h / 2.4);
            //
            Vector2 v67 = new Vector2(v66.X, v66.Y - (h / 2.4) / 2.3);
            //
            Vector2 v68 = new Vector2(v64.X + ((l2 - l3) / 2) * 2 / 3, v64.Y);
            Vector2 v69 = new Vector2(v68.X, v68.Y + (h1 - h));
            Vector2 v70 = new Vector2(v68.X + ((l2 - l3) / 2) * 1 / 3, v68.Y);
            //
            Vector2 v71 = new Vector2(v66.X, v66.Y + h / 8.3);
            //
            Vector2 v72 = new Vector2(v66.X - h / 26, v66.Y - (h / 2.4) / 3.2);
            Vector2 v73 = new Vector2(v48.X, v48.Y + h / 24);
            //
            Vector2 v74 = new Vector2(v73.X + (((l2 - l3) / 2) * 2.3 / 3.3) / 1.8, v73.Y - (((l2 - l3) / 2) * 2.3 / 3) / 2.6);
            //上半
            Vector2 v75 = new Vector2(v53.X + h / 36, v53.Y);
            Vector2 v76 = new Vector2(v75.X + ((l2 - l3) / 2) * 2.8 / 3.2, v75.Y - ((l2 - l3) / 2) * 2.6 / 3.6);
            Vector2 v77 = new Vector2(v76.X, v76.Y - h / 7);
            Vector2 v78 = new Vector2(v76.X + h / 8, v76.Y - h / 30);
            //
            Vector2 v79 = new Vector2(v78.X + l3 / 3, v78.Y);
            Vector2 v80 = new Vector2(v78.X, v78.Y - h / 3.2);
            //
            Vector2 v81 = new Vector2(v42.X + ((l2 - l3) / 2) * 2.8 / 3.2, v42.Y + ((l2 - l3) / 2) * 2.6 / 3.6);
            Vector2 v82 = new Vector2(v81.X + h / 8, v81.Y + h / 30);
            Vector2 v83 = new Vector2(v82.X + l3 / 3, v82.Y);
            Vector2 v84 = new Vector2(v81.X, v81.Y + h / 4);
            Vector2 v85 = new Vector2(v82.X, v82.Y + h / 4.7);
            //中间
            Vector2 v86 = new Vector2(v67.X + h / 4, v67.Y - h / 4);
            Vector2 v87 = new Vector2(v86.X, v86.Y - h / 6.3);
            Vector2 v88 = new Vector2(v86.X + h / 12, v86.Y - h / 16);
            Vector2 v89 = new Vector2(v88.X + h / 20, v88.Y + h / 2.1);
            Vector2 v90 = new Vector2(v89.X - h / 36, v89.Y);
            Vector2 v91 = new Vector2(v90.X, v90.Y + h / 8);
            Vector2 v92 = new Vector2(v90.X - h / 10, v90.Y + h / 9);
            Vector2 v93 = new Vector2(v89.X + h / 36, v89.Y + h / 9);
            //
            Vector2 v94 = new Vector2(v90.X - h / 5, v90.Y - h / 3.1);
            Vector2 v95 = new Vector2(v90.X - h / 3, v90.Y);
            //下边
            Vector2 v96 = new Vector2(v85.X + l3 * 2 / 3, v85.Y - h / 36);
            Vector2 v97 = new Vector2(v88.X + l3 * 2 / 2.9, v85.Y);
            //
            Vector2 v98 = new Vector2(v90.X + l3 / 4.6, v90.Y - h / 10);
            //
            Vector2 v99 = new Vector2(v96.X + l3 / 3 - l3 / 8, v96.Y - h / 6);
            Vector2 v100 = new Vector2(v99.X + l3 / 8, v99.Y);
            //
            Vector2 v101 = new Vector2(v79.X + l3 * 2 / 3, v79.Y + h / 80);
            Vector2 v102 = new Vector2(v101.X - l2 / 9, v1.Y + h / 6);
            Vector2 v103 = new Vector2(v102.X + h / 6, v102.Y + h / 8);
            Vector2 v104 = new Vector2(v103.X - h / 26, v101.Y);
            Vector2 v105 = new Vector2(v101.X - l2 / 3.2, v1.Y + h / 2.15);
            Vector2 v106 = new Vector2(v103.X - h / 1.9, v103.Y);
            Vector2 v107 = new Vector2(v102.X, v102.Y + h / 8);
            //
            Vector2 v108 = new Vector2(v101.X + h / 22, v101.Y - h / 3.2);
            Vector2 v109 = new Vector2(v108.X - h / 3, v108.Y - h / 30);
            Vector2 v110 = new Vector2(v109.X - h / 24, v101.Y);
            //下底右边
            Vector2 v111 = new Vector2(v108.X - h / 23, v108.Y - h / 200);
            Vector2 v112 = new Vector2(v111.X, v111.Y - h3 - h / 28);
            //上侧斜边
            Vector2 v113 = new Vector2(v110.X + h / 3.07, v110.Y + h / 40);
            //
            Vector2 v114 = new Vector2(v111.X - (h / 23) * 1.3, v111.Y - (h / 200) * 1.3);
            Vector2 v115 = new Vector2(v114.X, v114.Y - h3 / 1.2);
            //
            Vector2 v116 = new Vector2(v101.X + h / 40, v115.Y + h / 5.6);
            Vector2 v117 = new Vector2(v108.X - h / 3.1, v116.Y - h / 30);
            Vector2 v118 = new Vector2(v109.X - h / 40, v117.Y + h / 3.5);
            Vector2 v119 = new Vector2(v110.X + h / 3.1, v118.Y + h / 40);
            //虚线段
            Vector2 v120 = new Vector2(v1.X + l1, v1.Y);
            Vector2 v121 = new Vector2(v120.X + l2 + h / 3, v120.Y);
            //*/
            Vector2 v122 = new Vector2(v120.X + l2 / 1.2, v120.Y);
            Vector2 v123 = new Vector2(v120.X + l2 / 1.6, v120.Y);
            Vector2 v124 = new Vector2(v52.X, v37.Y);
            Vector2 v125 = new Vector2(v120.X + l2 / 1.4, v120.Y);
            //
            Vector2 v126 = new Vector2(v89.X - h / 36, v89.Y + h / 20);
            Vector2 v127 = new Vector2(v123.X + h * 1.59, v123.Y + h / 3.7);
            //
            Vector2 v128 = new Vector2(v127.X + h / 9, v123.Y + h / 4);
            Vector2 v129 = new Vector2(v128.X + h / 3.5, v128.Y - h / 10);
            //
            Vector2 v130 = new Vector2(v123.X + h * 1.3, v1.Y - h / 5);
            Vector2 v131 = new Vector2(v123.X + h * 1.3, v1.Y - h / 7);
            Vector2 v132 = new Vector2(v123.X + h * 1.3, v1.Y - h / 20);
            //
            Vector2 v133 = new Vector2(v130.X + h / 1.44, v130.Y + h / 16);
            Vector2 v134 = new Vector2(v131.X + h / 1.46, v131.Y + h / 16);
            Vector2 v135 = new Vector2(v132.X + h / 1.46, v132.Y + h / 16);
            //线段
            //主视图
            //Vector2[] Line1 = { v1, v2 };
            //fun.drawBLine(dxf, Line1, 0.15, contour);
            //Vector2[] Line2 = { v1, v3 };
            //fun.drawBLine(dxf, Line2, 0.15, contour);
            //Vector2[] Line3 = { v2, v4 };
            //fun.drawBLine(dxf, Line3, 0.15, contour);
            //Vector2[] Line4 = { v3, v5 };
            //fun.drawBLine(dxf, Line4, 0.15, contour);
            //Vector2[] Line5 = { v4, v6 };
            //fun.drawBLine(dxf, Line5, 0.15, contour);
            //Vector2[] Line6 = { v5, v7 };
            //fun.drawBLine(dxf, Line6, 0.15, contour);
            //Vector2[] Line7 = { v6, v8 };
            //fun.drawBLine(dxf, Line7, 0.15, contour);
            ////
            //Vector2[] Line8 = { v9, v8 };
            //fun.drawBLine(dxf, Line8, 0.15, contour);
            ////
            //Vector2[] Line9 = { v7, v10 };
            //fun.drawBLine(dxf, Line9, 0.15, contour);
            //Vector2[] Line10 = { v11, v10 };
            //fun.drawBLine(dxf, Line10, 0.15, contour);
            ////
            //Vector2[] Line11 = { v12, v6 };
            //fun.drawBLine(dxf, Line11, 0.15, contour);
            //Vector2[] Line12 = { v13, v7 };
            //fun.drawBLine(dxf, Line12, 0.15, contour);
            //Vector2[] Line13 = { v13, v12 };
            //fun.drawBLine(dxf, Line13, 0.15, contour);
            ////
            //Vector2[] Line14 = { v14, v8 };
            //fun.drawBLine(dxf, Line14, 0.15, contour);
            //Vector2[] Line15 = { v14, v15 };
            //fun.drawBLine(dxf, Line15, 0.15, contour);
            //Vector2[] Line16 = { v15, v10 };
            //fun.drawBLine(dxf, Line16, 0.15, contour);
            ////
            //Vector2[] Line17 = { v17, v16 };
            //fun.drawPlinetype(dxf, Line17, refin, Linetype.Dashed);
            //Vector2[] Line18 = { v17, v18 };
            //fun.drawPlinetype(dxf, Line18, refin, Linetype.Dashed);
            //Vector2[] Line19 = { v16, v19 };
            //fun.drawPlinetype(dxf, Line19, refin, Linetype.Dashed);
            //Vector2[] Line20 = { v18, v19 };
            //fun.drawPlinetype(dxf, Line20, refin, Linetype.Dashed);
            //Vector2[] Line21 = { v18, v20 };
            //fun.drawPlinetype(dxf, Line21, refin, Linetype.Dashed);
            //Vector2[] Line22 = { v19, v21 };
            //fun.drawPlinetype(dxf, Line22, refin, Linetype.Dashed);
            ////
            //Vector2[] Line23 = { v14, v22 };
            //fun.drawBLine(dxf, Line23, 0.15, contour);
            //Vector2[] Line24 = { v15, v23 };
            //fun.drawBLine(dxf, Line24, 0.15, contour);
            //Vector2[] Line25 = { v22, v23 };
            //fun.drawBLine(dxf, Line25, 0.15, contour);
            //Vector2[] Line26 = { v14, v24 };
            //fun.drawPlinetype(dxf, Line26, refin, Linetype.Dashed);
            //Vector2[] Line27 = { v15, v25 };
            //fun.drawPlinetype(dxf, Line27, refin, Linetype.Dashed);
            //Vector2[] Line28 = { v26, v27 };
            //fun.drawPlinetype(dxf, Line28, refin, Linetype.Dashed);
            //Vector2[] Line29 = { v28, v29 };
            //fun.drawPlinetype(dxf, Line29, refin, Linetype.Dashed);
            //LwPolyline Arc1 = new LwPolyline();
            //Arc1.Vertexes.Add(new LwPolylineVertex(v24));
            //Arc1.Vertexes.Add(new LwPolylineVertex(v26));
            //Arc1.Vertexes[0].Bulge = -h / 36;
            //fun.PolyFill(dxf, Arc1, 0.08, refin);
            //LwPolyline Arc2 = new LwPolyline();
            //Arc2.Vertexes.Add(new LwPolylineVertex(v25));
            //Arc2.Vertexes.Add(new LwPolylineVertex(v29));
            //Arc2.Vertexes[0].Bulge = h / 36;
            //fun.PolyFill(dxf, Arc2, 0.08, refin);
            //Vector2[] Line30 = { v16, v30 };
            //fun.drawBLine(dxf, Line30, 0.08, refin);
            //Vector2[] Line31 = { v17, v31 };
            //fun.drawBLine(dxf, Line31, 0.08, refin);
            ////
            //Vector2[] Line32 = { v32, v12 };
            //fun.drawBLine(dxf, Line32, 0.15, contour);
            //Vector2[] Line33 = { v33, v13 };
            //fun.drawBLine(dxf, Line33, 0.15, contour);
            //Vector2[] Line34 = { v34, v35 };
            //fun.drawBLine(dxf, Line34, 0.15, contour);
            //Vector2[] Line35 = { v34, v36 };
            //fun.drawBLine(dxf, Line35, 0.15, contour);
            //Vector2[] Line36 = { v37, v38 };
            //fun.drawBLine(dxf, Line36, 0.15, contour);
            //Vector2[] Line37 = { v39, v37 };
            //fun.drawBLine(dxf, Line37, 0.15, contour);
            //Vector2[] Line38 = { v39, v33 };
            //fun.drawBLine(dxf, Line38, 0.15, contour);
            //Vector2[] Line39 = { v26, v29 };
            //fun.drawPlinetype(dxf, Line39, refin, Linetype.Dashed);
            //Vector2[] Line40 = { v24, v40 };
            //fun.drawPlinetype(dxf, Line40, refin, Linetype.Dashed);
            //Vector2[] Line41 = { v32, v40 };
            //fun.drawPlinetype(dxf, Line41, refin, Linetype.Dashed);
            //Vector2[] Line42 = { v25, v41 };
            //fun.drawBLine(dxf, Line42, 0.08, skdimensioning);
            //Vector2[] Line43 = { v42, v39 };
            //fun.drawBLine(dxf, Line43, 0.15, contour);
            //Vector2[] Line44 = { v42, v43 };
            //fun.drawBLine(dxf, Line44, 0.15, contour);
            //Vector2[] Line45 = { v37, v43 };
            //fun.drawBLine(dxf, Line45, 0.15, contour);
            //Vector2[] Line46 = { v41, v44 };
            //fun.drawBLine(dxf, Line46, 0.08, skdimensioning);
            //Vector2[] Line47 = { v45, v44 };
            //fun.drawBLine(dxf, Line47, 0.08, skdimensioning);
            //Vector2[] Line48 = { v45, v46 };
            //fun.drawBLine(dxf, Line48, 0.08, skdimensioning);
            //Vector2[] Line49 = { v45, v47 };
            //fun.drawBLine(dxf, Line49, 0.08, skdimensioning);
            //Vector2[] Line50 = { v48, v45 };
            //fun.drawBLine(dxf, Line50, 0.08, skdimensioning);
            //Vector2[] Line51 = { v49, v41 };
            //fun.drawBLine(dxf, Line51, 0.08, skdimensioning);
            //Vector2[] Line52 = { v50, v44 };
            //fun.drawBLine(dxf, Line52, 0.08, skdimensioning);
            //Vector2[] Line53 = { v51, v46 };
            //fun.drawBLine(dxf, Line53, 0.08, skdimensioning);
            //Vector2[] Line54 = { v51, v47 };
            //fun.drawBLine(dxf, Line54, 0.08, skdimensioning);
            //Vector2[] Line55 = { v51, v52 };
            //fun.drawBLine(dxf, Line55, 0.08, skdimensioning);
            //Vector2[] Line56 = { v48, v52 };
            //fun.drawBLine(dxf, Line56, 0.08, skdimensioning);
            //Vector2[] Line57 = { v32, v53 };
            //fun.drawBLine(dxf, Line57, 0.15, contour);
            //Vector2[] Line58 = { v54, v53 };
            //fun.drawBLine(dxf, Line58, 0.15, contour);
            //Vector2[] Line59 = { v54, v55 };
            //fun.drawBLine(dxf, Line59, 0.15, contour);
            //Vector2[] Line60 = { v56, v55 };
            //fun.drawBLine(dxf, Line60, 0.15, contour);
            //Vector2[] Line61 = { v57, v58 };
            //fun.drawPlinetype(dxf, Line61, refin, Linetype.Dashed);
            //Vector2[] Line62 = { v59, v60 };
            //fun.drawPlinetype(dxf, Line62, refin, Linetype.Dashed);
            //Vector2[] Line63 = { v58, v60 };
            //fun.drawPlinetype(dxf, Line63, refin, Linetype.Dashed);
            //Vector2[] Line64 = { v61, v60 };
            //fun.drawPlinetype(dxf, Line64, refin, Linetype.Dashed);
            //Vector2[] Line65 = { v61, v58 };
            //fun.drawPlinetype(dxf, Line65, refin, Linetype.Dashed);
            //LwPolyline Arc3 = new LwPolyline();
            //Arc3.Vertexes.Add(new LwPolylineVertex(v53));
            //Arc3.Vertexes.Add(new LwPolylineVertex(v62));
            //Arc3.Vertexes[0].Bulge = h / 200;
            //fun.PolyFill(dxf, Arc3, 0.15, contour);
            //Vector2[] Line66 = { v63, v62 };
            //fun.drawBLine(dxf, Line66, 0.15, contour);
            //Vector2[] Line67 = { v34, v63 };
            //fun.drawBLine(dxf, Line67, 0.15, contour);
            //Vector2[] Line68 = { v64, v62 };
            //fun.drawBLine(dxf, Line68, 0.15, contour);
            //Vector2[] Line69 = { v65, v54 };
            //fun.drawBLine(dxf, Line69, 0.15, contour);
            //Vector2[] Line70 = { v66, v51 };
            //fun.drawBLine(dxf, Line70, 0.08, skdimensioning);
            ////
            //LwPolyline Arc4 = new LwPolyline();
            //Arc4.Vertexes.Add(new LwPolylineVertex(v63));
            //Arc4.Vertexes.Add(new LwPolylineVertex(v67));
            //Arc4.Vertexes[0].Bulge = h / 200;
            //fun.PolyFill(dxf, Arc4, 0.15, contour);
            //Vector2[] Line71 = { v64, v68 };
            //fun.drawBLine(dxf, Line71, 0.15, contour);
            //Vector2[] Line72 = { v69, v68 };
            //fun.drawBLine(dxf, Line72, 0.15, contour);
            //LwPolyline Arc5 = new LwPolyline();
            //Arc5.Vertexes.Add(new LwPolylineVertex(v53));
            //Arc5.Vertexes.Add(new LwPolylineVertex(v69));
            //Arc5.Vertexes[0].Bulge = -h / 180;
            //fun.PolyFill(dxf, Arc5, 0.15, contour);
            //Vector2[] Line73 = { v70, v68 };
            //fun.drawBLine(dxf, Line73, 0.15, contour);
            //LwPolyline Arc6 = new LwPolyline();
            //Arc6.Vertexes.Add(new LwPolylineVertex(v66));
            //Arc6.Vertexes.Add(new LwPolylineVertex(v71));
            //Arc6.Vertexes[0].Bulge = -h / 80;
            //fun.PolyFill(dxf, Arc6, 0.08, skdimensioning);
            //Vector2[] Line74 = { v71, v66 };
            //fun.drawBLine(dxf, Line74, 0.08, skdimensioning);
            //LwPolyline Arc7 = new LwPolyline();
            //Arc7.Vertexes.Add(new LwPolylineVertex(v69));
            //Arc7.Vertexes.Add(new LwPolylineVertex(v70));
            //Arc7.Vertexes[0].Bulge = -h / 200;
            //fun.PolyFill(dxf, Arc7, 0.15, contour);
            //Vector2[] Line75 = { v73, v72 };
            //fun.drawBLine(dxf, Line75, 0.15, contour);
            //Vector2[] Line76 = { v73, v74 };
            //fun.drawBLine(dxf, Line76, 0.15, contour);
            //Vector2[] Line77 = { v75, v76 };
            //fun.drawBLine(dxf, Line77, 0.15, contour);
            //Vector2[] Line78 = { v75, v53 };
            //fun.drawBLine(dxf, Line78, 0.15, contour);
            //Vector2[] Line79 = { v76, v77 };
            //fun.drawBLine(dxf, Line79, 0.15, contour);
            //LwPolyline Arc8 = new LwPolyline();
            //Arc8.Vertexes.Add(new LwPolylineVertex(v76));
            //Arc8.Vertexes.Add(new LwPolylineVertex(v78));
            //Arc8.Vertexes[0].Bulge = h / 160;
            //fun.PolyFill(dxf, Arc8, 0.15, contour);
            //Vector2[] Line80 = { v78, v79 };
            //fun.drawBLine(dxf, Line80, 0.15, contour);
            //Vector2[] Line81 = { v78, v80 };
            //fun.drawBLine(dxf, Line81, 0.15, contour);
            ////
            //Vector2[] Line82 = { v70, v80 };
            //fun.drawBLine(dxf, Line82, 0.15, contour);
            //Vector2[] Line83 = { v42, v81 };
            //fun.drawBLine(dxf, Line83, 0.15, contour);
            //LwPolyline Arc9 = new LwPolyline();
            //Arc9.Vertexes.Add(new LwPolylineVertex(v81));
            //Arc9.Vertexes.Add(new LwPolylineVertex(v82));
            //Arc9.Vertexes[0].Bulge = -h / 160;
            //fun.PolyFill(dxf, Arc9, 0.15, contour);
            //Vector2[] Line84 = { v83, v82 };
            //fun.drawBLine(dxf, Line84, 0.15, contour);
            //Vector2[] Line85 = { v84, v81 };
            //fun.drawBLine(dxf, Line85, 0.15, contour);
            //LwPolyline Arc10 = new LwPolyline();
            //Arc10.Vertexes.Add(new LwPolylineVertex(v74));
            //Arc10.Vertexes.Add(new LwPolylineVertex(v84));
            //Arc10.Vertexes[0].Bulge = h / 100;
            //fun.PolyFill(dxf, Arc10, 0.15, contour);
            //Vector2[] Line86 = { v85, v82 };
            //fun.drawBLine(dxf, Line86, 0.15, contour);
            //LwPolyline Arc11 = new LwPolyline();
            //Arc11.Vertexes.Add(new LwPolylineVertex(v85));
            //Arc11.Vertexes.Add(new LwPolylineVertex(v84));
            //Arc11.Vertexes[0].Bulge = h / 120;
            //fun.PolyFill(dxf, Arc11, 0.15, contour);
            //Vector2[] Line87 = { v86, v67 };
            //fun.drawBLine(dxf, Line87, 0.15, contour);
            //Vector2[] Line88 = { v86, v87 };
            //fun.drawBLine(dxf, Line88, 0.15, contour);
            //Vector2[] Line89 = { v86, v88 };
            //fun.drawBLine(dxf, Line89, 0.15, contour);
            //Vector2[] Line90 = { v89, v88 };
            //fun.drawBLine(dxf, Line90, 0.15, contour);
            //Vector2[] Line91 = { v89, v90 };
            //fun.drawBLine(dxf, Line91, 0.15, contour);
            //Vector2[] Line92 = { v91, v90 };
            //fun.drawBLine(dxf, Line92, 0.15, contour);
            //Vector2[] Line93 = { v92, v90 };
            //fun.drawBLine(dxf, Line93, 0.15, contour);
            //Vector2[] Line94 = { v93, v89 };
            //fun.drawBLine(dxf, Line94, 0.15, contour);
            //LwPolyline Arc12 = new LwPolyline();
            //Arc12.Vertexes.Add(new LwPolylineVertex(v90));
            //Arc12.Vertexes.Add(new LwPolylineVertex(v94));
            //Arc12.Vertexes[0].Bulge = h / 80;
            //fun.PolyFill(dxf, Arc12, 0.15, contour);
            //Vector2[] Line95 = { v90, v95 };
            //fun.drawPlinetype(dxf, Line95, refin, Linetype.Dashed);
            //LwPolyline Arc13 = new LwPolyline();
            //Arc13.Vertexes.Add(new LwPolylineVertex(v85));
            //Arc13.Vertexes.Add(new LwPolylineVertex(v96));
            //Arc13.Vertexes[0].Bulge = h / 180;
            //fun.PolyFill(dxf, Arc13, 0.15, contour);
            //LwPolyline Arc14 = new LwPolyline();
            //Arc14.Vertexes.Add(new LwPolylineVertex(v88));
            //Arc14.Vertexes.Add(new LwPolylineVertex(v97));
            //Arc14.Vertexes[0].Bulge = h / 160;
            //fun.PolyFill(dxf, Arc14, 0.15, contour);
            //Vector2[] Line96 = { v96, v80 };
            //fun.drawBLine(dxf, Line96, 0.15, contour);
            //Vector2[] Line97 = { v98, v90 };
            //fun.drawBLine(dxf, Line97, 0.15, contour);
            //LwPolyline Arc15 = new LwPolyline();
            //Arc15.Vertexes.Add(new LwPolylineVertex(v96));
            //Arc15.Vertexes.Add(new LwPolylineVertex(v99));
            //Arc15.Vertexes[0].Bulge = h / 260;
            //fun.PolyFill(dxf, Arc15, 0.15, contour);
            //Vector2[] Line98 = { v100, v99 };
            //fun.drawBLine(dxf, Line98, 0.15, contour);
            //Vector2[] Line99 = { v101, v79 };
            //fun.drawBLine(dxf, Line99, 0.07, contour);
            //LwPolyline Arc16 = new LwPolyline();
            //Arc16.Vertexes.Add(new LwPolylineVertex(v79));
            //Arc16.Vertexes.Add(new LwPolylineVertex(v102));
            //Arc16.Vertexes[0].Bulge = -h / 260;
            //fun.PolyFill(dxf, Arc16, 0.15, contour);
            //LwPolyline Arc17 = new LwPolyline();
            //Arc17.Vertexes.Add(new LwPolylineVertex(v103));
            //Arc17.Vertexes.Add(new LwPolylineVertex(v102));
            //Arc17.Vertexes[0].Bulge = -h / 44;
            //fun.PolyFill(dxf, Arc17, 0.15, contour);
            //Vector2[] Line100 = { v103, v104 };
            //fun.drawBLine(dxf, Line100, 0.15, contour);
            //LwPolyline Arc18 = new LwPolyline();
            //Arc18.Vertexes.Add(new LwPolylineVertex(v104));
            //Arc18.Vertexes.Add(new LwPolylineVertex(v105));
            //Arc18.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc18, 0.15, contour);
            //Vector2[] Line101 = { v103, v106 };
            //fun.drawBLine(dxf, Line101, 0.15, contour);
            //Vector2[] Line102 = { v102, v107 };
            //fun.drawBLine(dxf, Line102, 0.15, contour);
            //Vector2[] Line103 = { v101, v108 };
            //fun.drawBLine(dxf, Line103, 0.15, contour);
            //Vector2[] Line104 = { v109, v108 };
            //fun.drawBLine(dxf, Line104, 0.15, contour);
            //Vector2[] Line105 = { v109, v110 };
            //fun.drawBLine(dxf, Line105, 0.15, contour);
            //Vector2[] Line106 = { v111, v112 };
            //fun.drawBLine(dxf, Line106, 0.2, contour);
            //Vector2[] Line107 = { v110, v113 };
            //fun.drawBLine(dxf, Line107, 0.15, contour);
            //Vector2[] Line108 = { v101, v113 };
            //fun.drawBLine(dxf, Line108, 0.15, contour);
            //Vector2[] Line109 = { v114, v115 };
            //fun.drawBLine(dxf, Line109, 0.15, contour);
            //Vector2[] Line110 = { v112, v115 };
            //fun.drawBLine(dxf, Line110, 0.15, contour);
            ////
            //Vector2[] Line111 = { v116, v117 };
            //fun.drawBLine(dxf, Line111, 0.15, contour);
            //Vector2[] Line112 = { v118, v117 };
            //fun.drawBLine(dxf, Line112, 0.15, contour);
            //Vector2[] Line113 = { v118, v119 };
            //fun.drawBLine(dxf, Line113, 0.15, contour);
            //Vector2[] Line114 = { v116, v119 };
            //fun.drawBLine(dxf, Line114, 0.15, contour);
            //Vector2[] Line115 = { v120, v121 };
            //fun.drawBLine(dxf, Line115, 0.08, skdimensioning);
            ////
            //LwPolyline Arc19 = new LwPolyline();
            //Arc19.Vertexes.Add(new LwPolylineVertex(v48));
            //Arc19.Vertexes.Add(new LwPolylineVertex(v122));
            //Arc19.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc19, 0.08, refin);
            //LwPolyline Arc20 = new LwPolyline();
            //Arc20.Vertexes.Add(new LwPolylineVertex(v52));
            //Arc20.Vertexes.Add(new LwPolylineVertex(v123));
            //Arc20.Vertexes[0].Bulge = h / 300;
            //fun.PolyFill(dxf, Arc20, 0.08, refin);
            //LwPolyline Arc21 = new LwPolyline();
            //Arc21.Vertexes.Add(new LwPolylineVertex(v125));
            //Arc21.Vertexes.Add(new LwPolylineVertex(v124));
            //Arc21.Vertexes[0].Bulge = -h / 320;
            //fun.PolyFill(dxf, Arc21, 0.08, refin);
            ////
            //LwPolyline Arc22 = new LwPolyline();
            //Arc22.Vertexes.Add(new LwPolylineVertex(v90));
            //Arc22.Vertexes.Add(new LwPolylineVertex(v123));
            //Arc22.Vertexes[0].Bulge = -h / 400;
            //fun.PolyFill(dxf, Arc22, 0.08, refin);
            //LwPolyline Arc23 = new LwPolyline();
            //Arc23.Vertexes.Add(new LwPolylineVertex(v125));
            //Arc23.Vertexes.Add(new LwPolylineVertex(v126));
            //Arc23.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc23, 0.08, refin);
            //LwPolyline Arc24 = new LwPolyline();
            //Arc24.Vertexes.Add(new LwPolylineVertex(v71));
            //Arc24.Vertexes.Add(new LwPolylineVertex(v122));
            //Arc24.Vertexes[0].Bulge = -h / 320;
            //fun.PolyFill(dxf, Arc24, 0.08, refin);
            //LwPolyline Arc25 = new LwPolyline();
            //Arc25.Vertexes.Add(new LwPolylineVertex(v123));
            //Arc25.Vertexes.Add(new LwPolylineVertex(v127));
            //Arc25.Vertexes[0].Bulge = -h / 360;
            //fun.PolyFill(dxf, Arc25, 0.08, refin);
            //LwPolyline Arc26 = new LwPolyline();
            //Arc26.Vertexes.Add(new LwPolylineVertex(v125));
            //Arc26.Vertexes.Add(new LwPolylineVertex(v128));
            //Arc26.Vertexes[0].Bulge = -h / 360;
            //fun.PolyFill(dxf, Arc26, 0.08, refin);
            //LwPolyline Arc27 = new LwPolyline();
            //Arc27.Vertexes.Add(new LwPolylineVertex(v122));
            //Arc27.Vertexes.Add(new LwPolylineVertex(v129));
            //Arc27.Vertexes[0].Bulge = -h / 360;
            //fun.PolyFill(dxf, Arc27, 0.08, refin);
            ////
            //LwPolyline Arc28 = new LwPolyline();
            //Arc28.Vertexes.Add(new LwPolylineVertex(v123));
            //Arc28.Vertexes.Add(new LwPolylineVertex(v130));
            //Arc28.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc28, 0.08, refin);
            //LwPolyline Arc29 = new LwPolyline();
            //Arc29.Vertexes.Add(new LwPolylineVertex(v125));
            //Arc29.Vertexes.Add(new LwPolylineVertex(v131));
            //Arc29.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc29, 0.08, refin);
            //LwPolyline Arc30 = new LwPolyline();
            //Arc30.Vertexes.Add(new LwPolylineVertex(v122));
            //Arc30.Vertexes.Add(new LwPolylineVertex(v132));
            //Arc30.Vertexes[0].Bulge = h / 400;
            //fun.PolyFill(dxf, Arc30, 0.08, refin);
            //Vector2[] Line116 = { v130, v133 };
            //fun.drawPlinetype(dxf, Line116, refin, Linetype.Dashed);
            //Vector2[] Line117 = { v131, v134 };
            //fun.drawPlinetype(dxf, Line117, refin, Linetype.Dashed);
            //Vector2[] Line118 = { v132, v135 };
            //fun.drawPlinetype(dxf, Line118, refin, Linetype.Dashed);
            ////
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v1.X - h / 6, v1.Y), new Vector2(v1.X + l1, v1.Y) }, 0.25,centre, Linetype.Center);
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v27.X - h / 1.6, v27.Y + h / 22), new Vector2(v19.X + h + h / 6.8, v19.Y - h / 26) },0.25, centre, Linetype.Center);
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v28.X - h / 1.6, v28.Y - h / 22), new Vector2(v18.X + h + h / 6.8, v18.Y + h / 26) }, 0.25,centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v49.X, v49.Y - h / 16), new Vector2(v49.X, v49.Y + h + h / 3.8) }, centre, Linetype.Center);
            //DimensionStyle dimensionStyle = fun.CreateDimStyle();
            //dimensionStyle.ArrowSize = 1;
            //dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.TextHeight = 0.8;
            //double offset = 6;
            //LinearDimension dim1 = new LinearDimension(new Line(v6, v7), offset * 3, 90, dimensionStyle);
            //dim1.UserText = "Φ25 ";
            //dxf.AddEntity(dim1);
            //LinearDimension dim2 = new LinearDimension(new Line(v32, v33), offset * 14, 90, dimensionStyle);
            //dim2.UserText = "Φ32 ";
            //dxf.AddEntity(dim2);
            //LinearDimension dim3 = new LinearDimension(new Line(v112, v113), offset * 3, 270, dimensionStyle);
            //dim3.UserText = "Φ21 ";
            //dxf.AddEntity(dim3);
            //LinearDimension dim4 = new LinearDimension(new Line(v70, v113), offset * 3, 360, dimensionStyle);
            //dim4.UserText = "105 ";
            //dxf.AddEntity(dim4);
            //LinearDimension dim5 = new LinearDimension(new Line(v32, v113), offset * 5, 360, dimensionStyle);
            //dim5.UserText = "125 ";
            //dxf.AddEntity(dim5);
            //LinearDimension dim6 = new LinearDimension(new Line(v7, v32), offset * 8, 360, dimensionStyle);
            //dim6.UserText = "56 ";
            //dxf.AddEntity(dim6);
            //
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint44(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 25;
            double pi = Math.PI;
            double epsr = 140 * pi / 180;
            double h1 = 32;
            double h3 = 21;
            double l1 = 56;
            double l2 = 125;
            double l3 = 105;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h / 4);
            Vector2 v3 = new Vector2(v1.X, v1.Y - h / 4);
            //
            Vector2 v4 = new Vector2(v2.X, v2.Y + h / 4);
            Vector2 v5 = new Vector2(v3.X, v3.Y - h / 4);
            //
            Vector2 v6 = new Vector2(v4.X + h / 10, v4.Y + h / 8);
            Vector2 v7 = new Vector2(v5.X + h / 10, v5.Y - h / 8);
            //
            Vector2 v8 = new Vector2(v6.X, v6.Y - h / 3);
            Vector2 v9 = new Vector2(v1.X, v8.Y - h / 10);
            //
            Vector2 v10 = new Vector2(v7.X, v7.Y + h / 3);
            Vector2 v11 = new Vector2(v1.X, v10.Y + h / 10);
            //
            Vector2 v12 = new Vector2(v6.X + l1 - h / 10, v6.Y);
            Vector2 v13 = new Vector2(v7.X + l1 - h / 10, v7.Y);
            //
            Vector2 v14 = new Vector2(v8.X + l1 - h / 2.6, v8.Y);
            Vector2 v15 = new Vector2(v10.X + l1 - h / 2.6, v10.Y);
            //
            Vector2 v16 = new Vector2(v8.X + h / 16, v8.Y);
            Vector2 v17 = new Vector2(v10.X + h / 16, v10.Y);
            Vector2 v18 = new Vector2(v17.X + (l1 - h / 2.6) / 2, v17.Y);
            Vector2 v19 = new Vector2(v16.X + (l1 - h / 2.6) / 2, v16.Y);
            Vector2 v20 = new Vector2(v18.X + h / 10, v1.Y);
            Vector2 v21 = new Vector2(v19.X + h / 10, v1.Y);
            //
            Vector2 v22 = new Vector2(v14.X + h / 22, v14.Y - h / 18);
            Vector2 v23 = new Vector2(v15.X + h / 22, v15.Y + h / 18);
            //
            Vector2 v24 = new Vector2(v14.X + (l1 - h / 10) - (l1 - h / 2.6) + h / 16, v14.Y);
            Vector2 v25 = new Vector2(v15.X + (l1 - h / 10) - (l1 - h / 2.6) + h / 16, v15.Y);
            Vector2 v26 = new Vector2(v24.X, v24.Y - h / 12);
            Vector2 v27 = new Vector2(v19.X + h / 30, v19.Y - h / 12);
            //
            Vector2 v28 = new Vector2(v18.X + h / 30, v18.Y + h / 12);
            Vector2 v29 = new Vector2(v25.X, v25.Y + h / 12);
            //
            Vector2 v30 = new Vector2(v1.X, v16.Y + h / 8);
            Vector2 v31 = new Vector2(v1.X, v17.Y - h / 8);
            //第二阶段
            Vector2 v32 = new Vector2(v12.X, v12.Y + (h1 - h));
            Vector2 v33 = new Vector2(v13.X, v13.Y - (h1 - h));
            //圆弧里得斜坡(上）
            Vector2 v34 = new Vector2(v19.X + h + h / 6.8 + h / 30, v19.Y - h / 26);
            Vector2 v35 = new Vector2(v19.X + h + h / 6.8, v27.Y);
            //
            Vector2 v36 = new Vector2(v34.X, v34.Y + h / 16);
            //
            Vector2 v37 = new Vector2(v19.X + h + h / 6.8 + h / 30, v25.Y + h / 26);
            Vector2 v38 = new Vector2(v19.X + h + h / 6.8, v29.Y);
            //
            Vector2 v39 = new Vector2(v37.X, v33.Y - h / 26);
            //
            Vector2 v40 = new Vector2(v29.X, v23.Y + h + h / 22);
            Vector2 v41 = new Vector2(v29.X, v25.Y - h / 20);
            //
            Vector2 v42 = new Vector2(v39.X + (l2 - l3) / 2, v39.Y);
            //
            Vector2 v43 = new Vector2(v42.X, v37.Y);
            //
            Vector2 v44 = new Vector2(v41.X + ((l2 - l3) / 2) * 2.3 / 3, v41.Y);
            Vector2 v45 = new Vector2(v44.X, v25.Y);
            Vector2 v46 = new Vector2(v45.X - h / 36, v37.Y);
            Vector2 v47 = new Vector2(v45.X, v37.Y);
            Vector2 v48 = new Vector2(v42.X, v25.Y);
            //
            Vector2 v49 = new Vector2(v41.X + (((l2 - l3) / 2) * 2.3 / 3) / 2, v41.Y - h / 16);
            Vector2 v50 = new Vector2(v44.X - (((l2 - l3) / 2) * 2.3 / 3) / 2, v44.Y - h / 16);
            //
            Vector2 v51 = new Vector2(v46.X + h / 36, v46.Y + h / 26);
            Vector2 v52 = new Vector2(v42.X, v51.Y);
            //
            Vector2 v53 = new Vector2(v32.X + (l2 - l3) / 2, v32.Y);
            Vector2 v54 = new Vector2(v53.X, v12.Y - h / 3.6);
            Vector2 v55 = new Vector2(v54.X - h / 2.707, v54.Y);
            Vector2 v56 = new Vector2(v55.X, v55.Y - h / 32);
            //
            Vector2 v57 = new Vector2(v32.X + (l2 - l3) / 6, v32.Y);
            Vector2 v58 = new Vector2(v57.X, v57.Y - h / 6);
            Vector2 v59 = new Vector2(v32.X + (l2 - l3) / 2.6, v32.Y);
            Vector2 v60 = new Vector2(v59.X, v57.Y - h / 6);
            Vector2 v61 = new Vector2(v49.X, v60.Y - h / 20);
            //
            Vector2 v62 = new Vector2(v54.X - h / 12, v54.Y);
            Vector2 v63 = new Vector2(v62.X - h / 20, v62.Y - h / 10.5);
            //
            Vector2 v64 = new Vector2(v62.X + h / 8, v62.Y - h / 20);
            Vector2 v65 = new Vector2(v54.X, v54.Y - h / 36);
            //
            Vector2 v66 = new Vector2(v51.X, v51.Y + h / 2.4);
            //
            Vector2 v67 = new Vector2(v66.X, v66.Y - (h / 2.4) / 2.3);
            //
            Vector2 v68 = new Vector2(v64.X + ((l2 - l3) / 2) * 2 / 3, v64.Y);
            Vector2 v69 = new Vector2(v68.X, v68.Y + (h1 - h));
            Vector2 v70 = new Vector2(v68.X + ((l2 - l3) / 2) * 1 / 3, v68.Y);
            //
            Vector2 v71 = new Vector2(v66.X, v66.Y + h / 8.3);
            //
            Vector2 v72 = new Vector2(v66.X - h / 26, v66.Y - (h / 2.4) / 3.2);
            Vector2 v73 = new Vector2(v48.X, v48.Y + h / 24);
            //
            Vector2 v74 = new Vector2(v73.X + (((l2 - l3) / 2) * 2.3 / 3.3) / 1.8, v73.Y - (((l2 - l3) / 2) * 2.3 / 3) / 2.6);
            //上半
            Vector2 v75 = new Vector2(v53.X + h / 36, v53.Y);
            Vector2 v76 = new Vector2(v75.X + ((l2 - l3) / 2) * 2.8 / 3.2, v75.Y - ((l2 - l3) / 2) * 2.6 / 3.6);
            Vector2 v77 = new Vector2(v76.X, v76.Y - h / 7);
            Vector2 v78 = new Vector2(v76.X + h / 8, v76.Y - h / 30);
            //
            Vector2 v79 = new Vector2(v78.X + l3 / 3, v78.Y);
            Vector2 v80 = new Vector2(v78.X, v78.Y - h / 3.2);
            //
            Vector2 v81 = new Vector2(v42.X + ((l2 - l3) / 2) * 2.8 / 3.2, v42.Y + ((l2 - l3) / 2) * 2.6 / 3.6);
            Vector2 v82 = new Vector2(v81.X + h / 8, v81.Y + h / 30);
            Vector2 v83 = new Vector2(v82.X + l3 / 3, v82.Y);
            Vector2 v84 = new Vector2(v81.X, v81.Y + h / 4);
            Vector2 v85 = new Vector2(v82.X, v82.Y + h / 4.7);
            //中间
            Vector2 v86 = new Vector2(v67.X + h / 4, v67.Y - h / 4);
            Vector2 v87 = new Vector2(v86.X, v86.Y - h / 6.3);
            Vector2 v88 = new Vector2(v86.X + h / 12, v86.Y - h / 16);
            Vector2 v89 = new Vector2(v88.X + h / 20, v88.Y + h / 2.1);
            Vector2 v90 = new Vector2(v89.X - h / 36, v89.Y);
            Vector2 v91 = new Vector2(v90.X, v90.Y + h / 8);
            Vector2 v92 = new Vector2(v90.X - h / 10, v90.Y + h / 9);
            Vector2 v93 = new Vector2(v89.X + h / 36, v89.Y + h / 9);
            //
            Vector2 v94 = new Vector2(v90.X - h / 5, v90.Y - h / 3.1);
            Vector2 v95 = new Vector2(v90.X - h / 3, v90.Y);
            //下边
            Vector2 v96 = new Vector2(v85.X + l3 * 2 / 3, v85.Y - h / 36);
            Vector2 v97 = new Vector2(v88.X + l3 * 2 / 2.9, v85.Y);
            //
            Vector2 v98 = new Vector2(v90.X + l3 / 4.6, v90.Y - h / 10);
            //
            Vector2 v99 = new Vector2(v96.X + l3 / 3 - l3 / 8, v96.Y - h / 6);
            Vector2 v100 = new Vector2(v99.X + l3 / 8, v99.Y);
            //
            Vector2 v101 = new Vector2(v79.X + l3 * 2 / 3, v79.Y + h / 80);
            Vector2 v102 = new Vector2(v101.X - l2 / 9, v1.Y + h / 6);
            Vector2 v103 = new Vector2(v102.X + h / 6, v102.Y + h / 8);
            Vector2 v104 = new Vector2(v103.X - h / 26, v101.Y);
            Vector2 v105 = new Vector2(v101.X - l2 / 3.2, v1.Y + h / 2.15);
            Vector2 v106 = new Vector2(v103.X - h / 1.9, v103.Y);
            Vector2 v107 = new Vector2(v102.X, v102.Y + h / 8);
            //
            Vector2 v108 = new Vector2(v101.X + h / 22, v101.Y - h / 3.2);
            Vector2 v109 = new Vector2(v108.X - h / 3, v108.Y - h / 30);
            Vector2 v110 = new Vector2(v109.X - h / 24, v101.Y);
            //下底右边
            Vector2 v111 = new Vector2(v108.X - h / 23, v108.Y - h / 200);
            Vector2 v112 = new Vector2(v111.X, v111.Y - h3 - h / 28);
            //上侧斜边
            Vector2 v113 = new Vector2(v110.X + h / 3.07, v110.Y + h / 40);
            //
            Vector2 v114 = new Vector2(v111.X - (h / 23) * 1.3, v111.Y - (h / 200) * 1.3);
            Vector2 v115 = new Vector2(v114.X, v114.Y - h3 / 1.2);
            //
            Vector2 v116 = new Vector2(v101.X + h / 40, v115.Y + h / 5.6);
            Vector2 v117 = new Vector2(v108.X - h / 3.1, v116.Y - h / 30);
            Vector2 v118 = new Vector2(v109.X - h / 40, v117.Y + h / 3.5);
            Vector2 v119 = new Vector2(v110.X + h / 3.1, v118.Y + h / 40);
            //虚线段
            Vector2 v120 = new Vector2(v1.X + l1, v1.Y);
            Vector2 v121 = new Vector2(v120.X + l2 + h / 3, v120.Y);
            //*/
            Vector2 v122 = new Vector2(v120.X + l2 / 1.2, v120.Y);
            Vector2 v123 = new Vector2(v120.X + l2 / 1.6, v120.Y);
            Vector2 v124 = new Vector2(v52.X, v37.Y);
            Vector2 v125 = new Vector2(v120.X + l2 / 1.4, v120.Y);
            //
            Vector2 v126 = new Vector2(v89.X - h / 36, v89.Y + h / 20);
            Vector2 v127 = new Vector2(v123.X + h * 1.59, v123.Y + h / 3.7);
            //
            Vector2 v128 = new Vector2(v127.X + h / 9, v123.Y + h / 4);
            Vector2 v129 = new Vector2(v128.X + h / 3.5, v128.Y - h / 10);
            //
            Vector2 v130 = new Vector2(v123.X + h * 1.3, v1.Y - h / 5);
            Vector2 v131 = new Vector2(v123.X + h * 1.3, v1.Y - h / 7);
            Vector2 v132 = new Vector2(v123.X + h * 1.3, v1.Y - h / 20);
            //
            Vector2 v133 = new Vector2(v130.X + h / 1.44, v130.Y + h / 16);
            Vector2 v134 = new Vector2(v131.X + h / 1.46, v131.Y + h / 16);
            Vector2 v135 = new Vector2(v132.X + h / 1.46, v132.Y + h / 16);
            //
            Vector2 v136 = new Vector2(v1.X + h3 / 2, v1.Y);
            Vector2 v137 = new Vector2(v136.X + h3 / 1.5, v136.Y - h3 / 2.2);
            Vector2 v138 = new Vector2(v137.X + h3 / 12, v137.Y - h3 / 26);
            Vector2 v139 = new Vector2(v138.X + l3, v138.Y);
            Vector2 v140 = new Vector2(v139.X + h3 / 30, v139.Y - h3 / 3);
            Vector2 v141 = new Vector2(v140.X + h / 60, v140.Y - h / 20);
            Vector2 v142 = new Vector2(v141.X - h / 30, v141.Y - h3 / 4);
            Vector2 v143 = new Vector2(v1.X, v142.Y);
            //线段
            //主视图
            Vector2[] Line1 = { v136, v137 };
            fun.drawBLine(dxf, Line1, 0.15, contour);
            Vector2[] Line2 = { v1, v136 };
            fun.drawBLine(dxf, Line2, 0.15, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v137));
            Arc1.Vertexes.Add(new LwPolylineVertex(v138));
            Arc1.Vertexes[0].Bulge = h / 200;
            fun.PolyFill(dxf, Arc1, 0.15, contour);
            Vector2[] Line3 = { v139, v138 };
            fun.drawBLine(dxf, Line3, 0.15, contour);
            Vector2[] Line4 = { v139, v140 };
            fun.drawBLine(dxf, Line4, 0.15, contour);
            Vector2[] Line5 = { v141, v140 };
            fun.drawBLine(dxf, Line5, 0.15, contour);
            Vector2[] Line6 = { v141, v142 };
            fun.drawBLine(dxf, Line6, 0.15, contour);
            Vector2[] Line7 = { v143, v142 };
            fun.drawBLine(dxf, Line7, 0.15, contour);
            Vector2[] Line8 = { v143, v1 };
            fun.drawBLine(dxf, Line8, 0.15, contour);
            //
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint45(Dictionary<string, Object> data)   //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 25;
            double pi = Math.PI;
            double epsr = 140 * pi / 180;
            double h1 = 32;
            double h3 = 21;
            double l1 = 56;
            double l2 = 125;
            double l3 = 105;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h / 4);
            Vector2 v3 = new Vector2(v1.X, v1.Y - h / 4);
            //
            Vector2 v4 = new Vector2(v2.X, v2.Y + h / 4);
            Vector2 v5 = new Vector2(v3.X, v3.Y - h / 4);
            //
            Vector2 v6 = new Vector2(v4.X + h / 10, v4.Y + h / 8);
            Vector2 v7 = new Vector2(v5.X + h / 10, v5.Y - h / 8);
            //
            Vector2 v8 = new Vector2(v6.X, v6.Y - h / 3);
            Vector2 v9 = new Vector2(v1.X, v8.Y - h / 10);
            //
            Vector2 v10 = new Vector2(v7.X, v7.Y + h / 3);
            Vector2 v11 = new Vector2(v1.X, v10.Y + h / 10);
            //
            Vector2 v12 = new Vector2(v6.X + l1 - h / 10, v6.Y);
            Vector2 v13 = new Vector2(v7.X + l1 - h / 10, v7.Y);
            //
            Vector2 v14 = new Vector2(v8.X + l1 - h / 2.6, v8.Y);
            Vector2 v15 = new Vector2(v10.X + l1 - h / 2.6, v10.Y);
            //
            Vector2 v16 = new Vector2(v8.X + h / 16, v8.Y);
            Vector2 v17 = new Vector2(v10.X + h / 16, v10.Y);
            Vector2 v18 = new Vector2(v17.X + (l1 - h / 2.6) / 2, v17.Y);
            Vector2 v19 = new Vector2(v16.X + (l1 - h / 2.6) / 2, v16.Y);
            Vector2 v20 = new Vector2(v18.X + h / 10, v1.Y);
            Vector2 v21 = new Vector2(v19.X + h / 10, v1.Y);
            //
            Vector2 v22 = new Vector2(v14.X + h / 22, v14.Y - h / 18);
            Vector2 v23 = new Vector2(v15.X + h / 22, v15.Y + h / 18);
            //
            Vector2 v24 = new Vector2(v14.X + (l1 - h / 10) - (l1 - h / 2.6) + h / 16, v14.Y);
            Vector2 v25 = new Vector2(v15.X + (l1 - h / 10) - (l1 - h / 2.6) + h / 16, v15.Y);
            Vector2 v26 = new Vector2(v24.X, v24.Y - h / 12);
            Vector2 v27 = new Vector2(v19.X + h / 30, v19.Y - h / 12);
            //
            Vector2 v28 = new Vector2(v18.X + h / 30, v18.Y + h / 12);
            Vector2 v29 = new Vector2(v25.X, v25.Y + h / 12);
            //
            Vector2 v30 = new Vector2(v1.X, v16.Y + h / 8);
            Vector2 v31 = new Vector2(v1.X, v17.Y - h / 8);
            //第二阶段
            Vector2 v32 = new Vector2(v12.X, v12.Y + (h1 - h));
            Vector2 v33 = new Vector2(v13.X, v13.Y - (h1 - h));
            //圆弧里得斜坡(上）
            Vector2 v34 = new Vector2(v19.X + h + h / 6.8 + h / 30, v19.Y - h / 26);
            Vector2 v35 = new Vector2(v19.X + h + h / 6.8, v27.Y);
            //
            Vector2 v36 = new Vector2(v34.X, v34.Y + h / 16);
            //
            Vector2 v37 = new Vector2(v19.X + h + h / 6.8 + h / 30, v25.Y + h / 26);
            Vector2 v38 = new Vector2(v19.X + h + h / 6.8, v29.Y);
            //
            Vector2 v39 = new Vector2(v37.X, v33.Y - h / 26);
            //
            Vector2 v40 = new Vector2(v29.X, v23.Y + h + h / 22);
            Vector2 v41 = new Vector2(v29.X, v25.Y - h / 20);
            //
            Vector2 v42 = new Vector2(v39.X + (l2 - l3) / 2, v39.Y);
            //
            Vector2 v43 = new Vector2(v42.X, v37.Y);
            //
            Vector2 v44 = new Vector2(v41.X + ((l2 - l3) / 2) * 2.3 / 3, v41.Y);
            Vector2 v45 = new Vector2(v44.X, v25.Y);
            Vector2 v46 = new Vector2(v45.X - h / 36, v37.Y);
            Vector2 v47 = new Vector2(v45.X, v37.Y);
            Vector2 v48 = new Vector2(v42.X, v25.Y);
            //
            Vector2 v49 = new Vector2(v41.X + (((l2 - l3) / 2) * 2.3 / 3) / 2, v41.Y - h / 16);
            Vector2 v50 = new Vector2(v44.X - (((l2 - l3) / 2) * 2.3 / 3) / 2, v44.Y - h / 16);
            //
            Vector2 v51 = new Vector2(v46.X + h / 36, v46.Y + h / 26);
            Vector2 v52 = new Vector2(v42.X, v51.Y);
            //
            Vector2 v53 = new Vector2(v32.X + (l2 - l3) / 2, v32.Y);
            Vector2 v54 = new Vector2(v53.X, v12.Y - h / 3.6);
            Vector2 v55 = new Vector2(v54.X - h / 2.707, v54.Y);
            Vector2 v56 = new Vector2(v55.X, v55.Y - h / 32);
            //
            Vector2 v57 = new Vector2(v32.X + (l2 - l3) / 6, v32.Y);
            Vector2 v58 = new Vector2(v57.X, v57.Y - h / 6);
            Vector2 v59 = new Vector2(v32.X + (l2 - l3) / 2.6, v32.Y);
            Vector2 v60 = new Vector2(v59.X, v57.Y - h / 6);
            Vector2 v61 = new Vector2(v49.X, v60.Y - h / 20);
            //
            Vector2 v62 = new Vector2(v54.X - h / 12, v54.Y);
            Vector2 v63 = new Vector2(v62.X - h / 20, v62.Y - h / 10.5);
            //
            Vector2 v64 = new Vector2(v62.X + h / 8, v62.Y - h / 20);
            Vector2 v65 = new Vector2(v54.X, v54.Y - h / 36);
            //
            Vector2 v66 = new Vector2(v51.X, v51.Y + h / 2.4);
            //
            Vector2 v67 = new Vector2(v66.X, v66.Y - (h / 2.4) / 2.3);
            //
            Vector2 v68 = new Vector2(v64.X + ((l2 - l3) / 2) * 2 / 3, v64.Y);
            Vector2 v69 = new Vector2(v68.X, v68.Y + (h1 - h));
            Vector2 v70 = new Vector2(v68.X + ((l2 - l3) / 2) * 1 / 3, v68.Y);
            //
            Vector2 v71 = new Vector2(v66.X, v66.Y + h / 8.3);
            //
            Vector2 v72 = new Vector2(v66.X - h / 26, v66.Y - (h / 2.4) / 3.2);
            Vector2 v73 = new Vector2(v48.X, v48.Y + h / 24);
            //
            Vector2 v74 = new Vector2(v73.X + (((l2 - l3) / 2) * 2.3 / 3.3) / 1.8, v73.Y - (((l2 - l3) / 2) * 2.3 / 3) / 2.6);
            //上半
            Vector2 v75 = new Vector2(v53.X + h / 36, v53.Y);
            Vector2 v76 = new Vector2(v75.X + ((l2 - l3) / 2) * 2.8 / 3.2, v75.Y - ((l2 - l3) / 2) * 2.6 / 3.6);
            Vector2 v77 = new Vector2(v76.X, v76.Y - h / 7);
            Vector2 v78 = new Vector2(v76.X + h / 8, v76.Y - h / 30);
            //
            Vector2 v79 = new Vector2(v78.X + l3 / 3, v78.Y);
            Vector2 v80 = new Vector2(v78.X, v78.Y - h / 3.2);
            //
            Vector2 v81 = new Vector2(v42.X + ((l2 - l3) / 2) * 2.8 / 3.2, v42.Y + ((l2 - l3) / 2) * 2.6 / 3.6);
            Vector2 v82 = new Vector2(v81.X + h / 8, v81.Y + h / 30);
            Vector2 v83 = new Vector2(v82.X + l3 / 3, v82.Y);
            Vector2 v84 = new Vector2(v81.X, v81.Y + h / 4);
            Vector2 v85 = new Vector2(v82.X, v82.Y + h / 4.7);
            //中间
            Vector2 v86 = new Vector2(v67.X + h / 4, v67.Y - h / 4);
            Vector2 v87 = new Vector2(v86.X, v86.Y - h / 6.3);
            Vector2 v88 = new Vector2(v86.X + h / 12, v86.Y - h / 16);
            Vector2 v89 = new Vector2(v88.X + h / 20, v88.Y + h / 2.1);
            Vector2 v90 = new Vector2(v89.X - h / 36, v89.Y);
            Vector2 v91 = new Vector2(v90.X, v90.Y + h / 8);
            Vector2 v92 = new Vector2(v90.X - h / 10, v90.Y + h / 9);
            Vector2 v93 = new Vector2(v89.X + h / 36, v89.Y + h / 9);
            //
            Vector2 v94 = new Vector2(v90.X - h / 5, v90.Y - h / 3.1);
            Vector2 v95 = new Vector2(v90.X - h / 3, v90.Y);
            //下边
            Vector2 v96 = new Vector2(v85.X + l3 * 2 / 3, v85.Y - h / 36);
            Vector2 v97 = new Vector2(v88.X + l3 * 2 / 2.9, v85.Y);
            //
            Vector2 v98 = new Vector2(v90.X + l3 / 4.6, v90.Y - h / 10);
            //
            Vector2 v99 = new Vector2(v96.X + l3 / 3 - l3 / 8, v96.Y - h / 6);
            Vector2 v100 = new Vector2(v99.X + l3 / 8, v99.Y);
            //
            Vector2 v101 = new Vector2(v79.X + l3 * 2 / 3, v79.Y + h / 80);
            Vector2 v102 = new Vector2(v101.X - l2 / 9, v1.Y + h / 6);
            Vector2 v103 = new Vector2(v102.X + h / 6, v102.Y + h / 8);
            Vector2 v104 = new Vector2(v103.X - h / 26, v101.Y);
            Vector2 v105 = new Vector2(v101.X - l2 / 3.2, v1.Y + h / 2.15);
            Vector2 v106 = new Vector2(v103.X - h / 1.9, v103.Y);
            Vector2 v107 = new Vector2(v102.X, v102.Y + h / 8);
            //
            Vector2 v108 = new Vector2(v101.X + h / 22, v101.Y - h / 3.2);
            Vector2 v109 = new Vector2(v108.X - h / 3, v108.Y - h / 30);
            Vector2 v110 = new Vector2(v109.X - h / 24, v101.Y);
            //下底右边
            Vector2 v111 = new Vector2(v108.X - h / 23, v108.Y - h / 200);
            Vector2 v112 = new Vector2(v111.X, v111.Y - h3 - h / 28);
            //上侧斜边
            Vector2 v113 = new Vector2(v110.X + h / 3.07, v110.Y + h / 40);
            //
            Vector2 v114 = new Vector2(v111.X - (h / 23) * 1.3, v111.Y - (h / 200) * 1.3);
            Vector2 v115 = new Vector2(v114.X, v114.Y - h3 / 1.2);
            //
            Vector2 v116 = new Vector2(v101.X + h / 40, v115.Y + h / 5.6);
            Vector2 v117 = new Vector2(v108.X - h / 3.1, v116.Y - h / 30);
            Vector2 v118 = new Vector2(v109.X - h / 40, v117.Y + h / 3.5);
            Vector2 v119 = new Vector2(v110.X + h / 3.1, v118.Y + h / 40);
            //虚线段
            Vector2 v120 = new Vector2(v1.X + l1, v1.Y);
            Vector2 v121 = new Vector2(v120.X + l2 + h / 3, v120.Y);
            //*/
            Vector2 v122 = new Vector2(v120.X + l2 / 1.2, v120.Y);
            Vector2 v123 = new Vector2(v120.X + l2 / 1.6, v120.Y);
            Vector2 v124 = new Vector2(v52.X, v37.Y);
            Vector2 v125 = new Vector2(v120.X + l2 / 1.4, v120.Y);
            //
            Vector2 v126 = new Vector2(v89.X - h / 36, v89.Y + h / 20);
            Vector2 v127 = new Vector2(v123.X + h * 1.59, v123.Y + h / 3.7);
            //
            Vector2 v128 = new Vector2(v127.X + h / 9, v123.Y + h / 4);
            Vector2 v129 = new Vector2(v128.X + h / 3.5, v128.Y - h / 10);
            //
            Vector2 v130 = new Vector2(v123.X + h * 1.3, v1.Y - h / 5);
            Vector2 v131 = new Vector2(v123.X + h * 1.3, v1.Y - h / 7);
            Vector2 v132 = new Vector2(v123.X + h * 1.3, v1.Y - h / 20);
            //
            Vector2 v133 = new Vector2(v130.X + h / 1.44, v130.Y + h / 16);
            Vector2 v134 = new Vector2(v131.X + h / 1.46, v131.Y + h / 16);
            Vector2 v135 = new Vector2(v132.X + h / 1.46, v132.Y + h / 16);
            //线段
            //主视图
            //Vector2[] Line1 = { v1, v2 };
            //fun.drawBLine(dxf, Line1, 0.15, contour);
            //Vector2[] Line2 = { v1, v3 };
            //fun.drawBLine(dxf, Line2, 0.15, contour);
            //Vector2[] Line3 = { v2, v4 };
            //fun.drawBLine(dxf, Line3, 0.15, contour);
            //Vector2[] Line4 = { v3, v5 };
            //fun.drawBLine(dxf, Line4, 0.15, contour);
            //Vector2[] Line5 = { v4, v6 };
            //fun.drawBLine(dxf, Line5, 0.15, contour);
            //Vector2[] Line6 = { v5, v7 };
            //fun.drawBLine(dxf, Line6, 0.15, contour);
            //Vector2[] Line7 = { v6, v8 };
            //fun.drawBLine(dxf, Line7, 0.15, contour);
            ////
            //Vector2[] Line8 = { v9, v8 };
            //fun.drawBLine(dxf, Line8, 0.15, contour);
            ////
            //Vector2[] Line9 = { v7, v10 };
            //fun.drawBLine(dxf, Line9, 0.15, contour);
            //Vector2[] Line10 = { v11, v10 };
            //fun.drawBLine(dxf, Line10, 0.15, contour);
            ////
            //Vector2[] Line11 = { v12, v6 };
            //fun.drawBLine(dxf, Line11, 0.15, contour);
            //Vector2[] Line12 = { v13, v7 };
            //fun.drawBLine(dxf, Line12, 0.15, contour);
            //Vector2[] Line13 = { v13, v12 };
            //fun.drawBLine(dxf, Line13, 0.15, contour);
            ////
            //Vector2[] Line14 = { v14, v8 };
            //fun.drawBLine(dxf, Line14, 0.15, contour);
            //Vector2[] Line15 = { v14, v15 };
            //fun.drawBLine(dxf, Line15, 0.15, contour);
            //Vector2[] Line16 = { v15, v10 };
            //fun.drawBLine(dxf, Line16, 0.15, contour);
            ////
            //Vector2[] Line17 = { v17, v16 };
            //fun.drawPlinetype(dxf, Line17, refin, Linetype.Dashed);
            //Vector2[] Line18 = { v17, v18 };
            //fun.drawPlinetype(dxf, Line18, refin, Linetype.Dashed);
            //Vector2[] Line19 = { v16, v19 };
            //fun.drawPlinetype(dxf, Line19, refin, Linetype.Dashed);
            //Vector2[] Line20 = { v18, v19 };
            //fun.drawPlinetype(dxf, Line20, refin, Linetype.Dashed);
            //Vector2[] Line21 = { v18, v20 };
            //fun.drawPlinetype(dxf, Line21, refin, Linetype.Dashed);
            //Vector2[] Line22 = { v19, v21 };
            //fun.drawPlinetype(dxf, Line22, refin, Linetype.Dashed);
            ////
            //Vector2[] Line23 = { v14, v22 };
            //fun.drawBLine(dxf, Line23, 0.15, contour);
            //Vector2[] Line24 = { v15, v23 };
            //fun.drawBLine(dxf, Line24, 0.15, contour);
            //Vector2[] Line25 = { v22, v23 };
            //fun.drawBLine(dxf, Line25, 0.15, contour);
            //Vector2[] Line26 = { v14, v24 };
            //fun.drawPlinetype(dxf, Line26, refin, Linetype.Dashed);
            //Vector2[] Line27 = { v15, v25 };
            //fun.drawPlinetype(dxf, Line27, refin, Linetype.Dashed);
            //Vector2[] Line28 = { v26, v27 };
            //fun.drawPlinetype(dxf, Line28, refin, Linetype.Dashed);
            //Vector2[] Line29 = { v28, v29 };
            //fun.drawPlinetype(dxf, Line29, refin, Linetype.Dashed);
            //LwPolyline Arc1 = new LwPolyline();
            //Arc1.Vertexes.Add(new LwPolylineVertex(v24));
            //Arc1.Vertexes.Add(new LwPolylineVertex(v26));
            //Arc1.Vertexes[0].Bulge = -h / 36;
            //fun.PolyFill(dxf, Arc1, 0.08, refin);
            //LwPolyline Arc2 = new LwPolyline();
            //Arc2.Vertexes.Add(new LwPolylineVertex(v25));
            //Arc2.Vertexes.Add(new LwPolylineVertex(v29));
            //Arc2.Vertexes[0].Bulge = h / 36;
            //fun.PolyFill(dxf, Arc2, 0.08, refin);
            //Vector2[] Line30 = { v16, v30 };
            //fun.drawBLine(dxf, Line30, 0.08, refin);
            //Vector2[] Line31 = { v17, v31 };
            //fun.drawBLine(dxf, Line31, 0.08, refin);
            ////
            //Vector2[] Line32 = { v32, v12 };
            //fun.drawBLine(dxf, Line32, 0.15, contour);
            //Vector2[] Line33 = { v33, v13 };
            //fun.drawBLine(dxf, Line33, 0.15, contour);
            //Vector2[] Line34 = { v34, v35 };
            //fun.drawBLine(dxf, Line34, 0.15, contour);
            //Vector2[] Line35 = { v34, v36 };
            //fun.drawBLine(dxf, Line35, 0.15, contour);
            //Vector2[] Line36 = { v37, v38 };
            //fun.drawBLine(dxf, Line36, 0.15, contour);
            //Vector2[] Line37 = { v39, v37 };
            //fun.drawBLine(dxf, Line37, 0.15, contour);
            //Vector2[] Line38 = { v39, v33 };
            //fun.drawBLine(dxf, Line38, 0.15, contour);
            //Vector2[] Line39 = { v26, v29 };
            //fun.drawPlinetype(dxf, Line39, refin, Linetype.Dashed);
            //Vector2[] Line40 = { v24, v40 };
            //fun.drawPlinetype(dxf, Line40, refin, Linetype.Dashed);
            //Vector2[] Line41 = { v32, v40 };
            //fun.drawPlinetype(dxf, Line41, refin, Linetype.Dashed);
            //Vector2[] Line42 = { v25, v41 };
            //fun.drawBLine(dxf, Line42, 0.08, skdimensioning);
            //Vector2[] Line43 = { v42, v39 };
            //fun.drawBLine(dxf, Line43, 0.15, contour);
            //Vector2[] Line44 = { v42, v43 };
            //fun.drawBLine(dxf, Line44, 0.15, contour);
            //Vector2[] Line45 = { v37, v43 };
            //fun.drawBLine(dxf, Line45, 0.15, contour);
            //Vector2[] Line46 = { v41, v44 };
            //fun.drawBLine(dxf, Line46, 0.08, skdimensioning);
            //Vector2[] Line47 = { v45, v44 };
            //fun.drawBLine(dxf, Line47, 0.08, skdimensioning);
            //Vector2[] Line48 = { v45, v46 };
            //fun.drawBLine(dxf, Line48, 0.08, skdimensioning);
            //Vector2[] Line49 = { v45, v47 };
            //fun.drawBLine(dxf, Line49, 0.08, skdimensioning);
            //Vector2[] Line50 = { v48, v45 };
            //fun.drawBLine(dxf, Line50, 0.08, skdimensioning);
            //Vector2[] Line51 = { v49, v41 };
            //fun.drawBLine(dxf, Line51, 0.08, skdimensioning);
            //Vector2[] Line52 = { v50, v44 };
            //fun.drawBLine(dxf, Line52, 0.08, skdimensioning);
            //Vector2[] Line53 = { v51, v46 };
            //fun.drawBLine(dxf, Line53, 0.08, skdimensioning);
            //Vector2[] Line54 = { v51, v47 };
            //fun.drawBLine(dxf, Line54, 0.08, skdimensioning);
            //Vector2[] Line55 = { v51, v52 };
            //fun.drawBLine(dxf, Line55, 0.08, skdimensioning);
            //Vector2[] Line56 = { v48, v52 };
            //fun.drawBLine(dxf, Line56, 0.08, skdimensioning);
            //Vector2[] Line57 = { v32, v53 };
            //fun.drawBLine(dxf, Line57, 0.15, contour);
            //Vector2[] Line58 = { v54, v53 };
            //fun.drawBLine(dxf, Line58, 0.15, contour);
            //Vector2[] Line59 = { v54, v55 };
            //fun.drawBLine(dxf, Line59, 0.15, contour);
            //Vector2[] Line60 = { v56, v55 };
            //fun.drawBLine(dxf, Line60, 0.15, contour);
            //Vector2[] Line61 = { v57, v58 };
            //fun.drawPlinetype(dxf, Line61, refin, Linetype.Dashed);
            //Vector2[] Line62 = { v59, v60 };
            //fun.drawPlinetype(dxf, Line62, refin, Linetype.Dashed);
            //Vector2[] Line63 = { v58, v60 };
            //fun.drawPlinetype(dxf, Line63, refin, Linetype.Dashed);
            //Vector2[] Line64 = { v61, v60 };
            //fun.drawPlinetype(dxf, Line64, refin, Linetype.Dashed);
            //Vector2[] Line65 = { v61, v58 };
            //fun.drawPlinetype(dxf, Line65, refin, Linetype.Dashed);
            //LwPolyline Arc3 = new LwPolyline();
            //Arc3.Vertexes.Add(new LwPolylineVertex(v53));
            //Arc3.Vertexes.Add(new LwPolylineVertex(v62));
            //Arc3.Vertexes[0].Bulge = h / 200;
            //fun.PolyFill(dxf, Arc3, 0.15, contour);
            //Vector2[] Line66 = { v63, v62 };
            //fun.drawBLine(dxf, Line66, 0.15, contour);
            //Vector2[] Line67 = { v34, v63 };
            //fun.drawBLine(dxf, Line67, 0.15, contour);
            //Vector2[] Line68 = { v64, v62 };
            //fun.drawBLine(dxf, Line68, 0.15, contour);
            //Vector2[] Line69 = { v65, v54 };
            //fun.drawBLine(dxf, Line69, 0.15, contour);
            //Vector2[] Line70 = { v66, v51 };
            //fun.drawBLine(dxf, Line70, 0.08, skdimensioning);
            ////
            //LwPolyline Arc4 = new LwPolyline();
            //Arc4.Vertexes.Add(new LwPolylineVertex(v63));
            //Arc4.Vertexes.Add(new LwPolylineVertex(v67));
            //Arc4.Vertexes[0].Bulge = h / 200;
            //fun.PolyFill(dxf, Arc4, 0.15, contour);
            //Vector2[] Line71 = { v64, v68 };
            //fun.drawBLine(dxf, Line71, 0.15, contour);
            //Vector2[] Line72 = { v69, v68 };
            //fun.drawBLine(dxf, Line72, 0.15, contour);
            //LwPolyline Arc5 = new LwPolyline();
            //Arc5.Vertexes.Add(new LwPolylineVertex(v53));
            //Arc5.Vertexes.Add(new LwPolylineVertex(v69));
            //Arc5.Vertexes[0].Bulge = -h / 180;
            //fun.PolyFill(dxf, Arc5, 0.15, contour);
            //Vector2[] Line73 = { v70, v68 };
            //fun.drawBLine(dxf, Line73, 0.15, contour);
            //LwPolyline Arc6 = new LwPolyline();
            //Arc6.Vertexes.Add(new LwPolylineVertex(v66));
            //Arc6.Vertexes.Add(new LwPolylineVertex(v71));
            //Arc6.Vertexes[0].Bulge = -h / 80;
            //fun.PolyFill(dxf, Arc6, 0.08, skdimensioning);
            //Vector2[] Line74 = { v71, v66 };
            //fun.drawBLine(dxf, Line74, 0.08, skdimensioning);
            //LwPolyline Arc7 = new LwPolyline();
            //Arc7.Vertexes.Add(new LwPolylineVertex(v69));
            //Arc7.Vertexes.Add(new LwPolylineVertex(v70));
            //Arc7.Vertexes[0].Bulge = -h / 200;
            //fun.PolyFill(dxf, Arc7, 0.15, contour);
            //Vector2[] Line75 = { v73, v72 };
            //fun.drawBLine(dxf, Line75, 0.15, contour);
            //Vector2[] Line76 = { v73, v74 };
            //fun.drawBLine(dxf, Line76, 0.15, contour);
            //Vector2[] Line77 = { v75, v76 };
            //fun.drawBLine(dxf, Line77, 0.15, contour);
            //Vector2[] Line78 = { v75, v53 };
            //fun.drawBLine(dxf, Line78, 0.15, contour);
            //Vector2[] Line79 = { v76, v77 };
            //fun.drawBLine(dxf, Line79, 0.15, contour);
            //LwPolyline Arc8 = new LwPolyline();
            //Arc8.Vertexes.Add(new LwPolylineVertex(v76));
            //Arc8.Vertexes.Add(new LwPolylineVertex(v78));
            //Arc8.Vertexes[0].Bulge = h / 160;
            //fun.PolyFill(dxf, Arc8, 0.15, contour);
            //Vector2[] Line80 = { v78, v79 };
            //fun.drawBLine(dxf, Line80, 0.15, contour);
            //Vector2[] Line81 = { v78, v80 };
            //fun.drawBLine(dxf, Line81, 0.15, contour);
            //
            //Vector2[] Line82 = { v70, v80 };
            //fun.drawBLine(dxf, Line82, 0.15, contour);
            //Vector2[] Line83 = { v42, v81 };
            //fun.drawBLine(dxf, Line83, 0.15, contour);
            //LwPolyline Arc9 = new LwPolyline();
            //Arc9.Vertexes.Add(new LwPolylineVertex(v81));
            //Arc9.Vertexes.Add(new LwPolylineVertex(v82));
            //Arc9.Vertexes[0].Bulge = -h / 160;
            //fun.PolyFill(dxf, Arc9, 0.15, contour);
            //Vector2[] Line84 = { v83, v82 };
            //fun.drawBLine(dxf, Line84, 0.15, contour);
            //Vector2[] Line85 = { v84, v81 };
            //fun.drawBLine(dxf, Line85, 0.15, contour);
            //LwPolyline Arc10 = new LwPolyline();
            //Arc10.Vertexes.Add(new LwPolylineVertex(v74));
            //Arc10.Vertexes.Add(new LwPolylineVertex(v84));
            //Arc10.Vertexes[0].Bulge = h / 100;
            //fun.PolyFill(dxf, Arc10, 0.15, contour);
            //Vector2[] Line86 = { v85, v82 };
            //fun.drawBLine(dxf, Line86, 0.15, contour);
            //LwPolyline Arc11 = new LwPolyline();
            //Arc11.Vertexes.Add(new LwPolylineVertex(v85));
            //Arc11.Vertexes.Add(new LwPolylineVertex(v84));
            //Arc11.Vertexes[0].Bulge = h / 120;
            //fun.PolyFill(dxf, Arc11, 0.15, contour);
            //Vector2[] Line87 = { v86, v67 };
            //fun.drawBLine(dxf, Line87, 0.15, contour);
            //Vector2[] Line88 = { v86, v87 };
            //fun.drawBLine(dxf, Line88, 0.15, contour);
            //Vector2[] Line89 = { v86, v88 };
            //fun.drawBLine(dxf, Line89, 0.15, contour);
            //Vector2[] Line90 = { v89, v88 };
            //fun.drawBLine(dxf, Line90, 0.15, contour);
            //Vector2[] Line91 = { v89, v90 };
            //fun.drawBLine(dxf, Line91, 0.15, contour);
            //Vector2[] Line92 = { v91, v90 };
            //fun.drawBLine(dxf, Line92, 0.15, contour);
            //Vector2[] Line93 = { v92, v90 };
            //fun.drawBLine(dxf, Line93, 0.15, contour);
            //Vector2[] Line94 = { v93, v89 };
            //fun.drawBLine(dxf, Line94, 0.15, contour);
            //LwPolyline Arc12 = new LwPolyline();
            //Arc12.Vertexes.Add(new LwPolylineVertex(v90));
            //Arc12.Vertexes.Add(new LwPolylineVertex(v94));
            //Arc12.Vertexes[0].Bulge = h / 80;
            //fun.PolyFill(dxf, Arc12, 0.15, contour);
            //Vector2[] Line95 = { v90, v95 };
            //fun.drawPlinetype(dxf, Line95, refin, Linetype.Dashed);
            //LwPolyline Arc13 = new LwPolyline();
            //Arc13.Vertexes.Add(new LwPolylineVertex(v85));
            //Arc13.Vertexes.Add(new LwPolylineVertex(v96));
            //Arc13.Vertexes[0].Bulge = h / 180;
            //fun.PolyFill(dxf, Arc13, 0.15, contour);
            //LwPolyline Arc14 = new LwPolyline();
            //Arc14.Vertexes.Add(new LwPolylineVertex(v88));
            //Arc14.Vertexes.Add(new LwPolylineVertex(v97));
            //Arc14.Vertexes[0].Bulge = h / 160;
            //fun.PolyFill(dxf, Arc14, 0.15, contour);
            //Vector2[] Line96 = { v96, v80 };
            //fun.drawBLine(dxf, Line96, 0.15, contour);
            //Vector2[] Line97 = { v98, v90 };
            //fun.drawBLine(dxf, Line97, 0.15, contour);
            //LwPolyline Arc15 = new LwPolyline();
            //Arc15.Vertexes.Add(new LwPolylineVertex(v96));
            //Arc15.Vertexes.Add(new LwPolylineVertex(v99));
            //Arc15.Vertexes[0].Bulge = h / 260;
            //fun.PolyFill(dxf, Arc15, 0.15, contour);
            //Vector2[] Line98 = { v100, v99 };
            //fun.drawBLine(dxf, Line98, 0.15, contour);
            //Vector2[] Line99 = { v101, v79 };
            //fun.drawBLine(dxf, Line99, 0.07, contour);
            //LwPolyline Arc16 = new LwPolyline();
            //Arc16.Vertexes.Add(new LwPolylineVertex(v79));
            //Arc16.Vertexes.Add(new LwPolylineVertex(v102));
            //Arc16.Vertexes[0].Bulge = -h / 260;
            //fun.PolyFill(dxf, Arc16, 0.15, contour);
            //LwPolyline Arc17 = new LwPolyline();
            //Arc17.Vertexes.Add(new LwPolylineVertex(v103));
            //Arc17.Vertexes.Add(new LwPolylineVertex(v102));
            //Arc17.Vertexes[0].Bulge = -h / 44;
            //fun.PolyFill(dxf, Arc17, 0.15, contour);
            //Vector2[] Line100 = { v103, v104 };
            //fun.drawBLine(dxf, Line100, 0.15, contour);
            //LwPolyline Arc18 = new LwPolyline();
            //Arc18.Vertexes.Add(new LwPolylineVertex(v104));
            //Arc18.Vertexes.Add(new LwPolylineVertex(v105));
            //Arc18.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc18, 0.15, contour);
            //Vector2[] Line101 = { v103, v106 };
            //fun.drawBLine(dxf, Line101, 0.15, contour);
            //Vector2[] Line102 = { v102, v107 };
            //fun.drawBLine(dxf, Line102, 0.15, contour);
            Vector2[] Line103 = { v101, v108 };
            fun.drawBLine(dxf, Line103, 0.5, contour);
            Vector2[] Line104 = { v109, v108 };
            fun.drawBLine(dxf, Line104, 0.5, contour);
            Vector2[] Line105 = { v109, v110 };
            fun.drawBLine(dxf, Line105, 0.5, contour);
            //Vector2[] Line106 = { v111, v112 };
            //fun.drawBLine(dxf, Line106, 0.2, contour);
            Vector2[] Line107 = { v110, v113 };
            fun.drawBLine(dxf, Line107, 0.5, contour);
            Vector2[] Line108 = { v101, v113 };
            fun.drawBLine(dxf, Line108, 0.5, contour);
            //Vector2[] Line109 = { v114, v115 };
            //fun.drawBLine(dxf, Line109, 0.15, contour);
            //Vector2[] Line110 = { v112, v115 };
            //fun.drawBLine(dxf, Line110, 0.15, contour);
            //
            Vector2[] Line111 = { v116, v117 };
            fun.drawBLine(dxf, Line111, 0.5, contour);
            Vector2[] Line112 = { v118, v117 };
            fun.drawBLine(dxf, Line112, 0.5, contour);
            Vector2[] Line113 = { v118, v119 };
            fun.drawBLine(dxf, Line113, 0.5, contour);
            Vector2[] Line114 = { v116, v119 };
            fun.drawBLine(dxf, Line114, 0.5, contour);
            //Vector2[] Line115 = { v120, v121 };
            //fun.drawBLine(dxf, Line115, 0.08, skdimensioning);
            ////
            //LwPolyline Arc19 = new LwPolyline();
            //Arc19.Vertexes.Add(new LwPolylineVertex(v48));
            //Arc19.Vertexes.Add(new LwPolylineVertex(v122));
            //Arc19.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc19, 0.08, refin);
            //LwPolyline Arc20 = new LwPolyline();
            //Arc20.Vertexes.Add(new LwPolylineVertex(v52));
            //Arc20.Vertexes.Add(new LwPolylineVertex(v123));
            //Arc20.Vertexes[0].Bulge = h / 300;
            //fun.PolyFill(dxf, Arc20, 0.08, refin);
            //LwPolyline Arc21 = new LwPolyline();
            //Arc21.Vertexes.Add(new LwPolylineVertex(v125));
            //Arc21.Vertexes.Add(new LwPolylineVertex(v124));
            //Arc21.Vertexes[0].Bulge = -h / 320;
            //fun.PolyFill(dxf, Arc21, 0.08, refin);
            ////
            //LwPolyline Arc22 = new LwPolyline();
            //Arc22.Vertexes.Add(new LwPolylineVertex(v90));
            //Arc22.Vertexes.Add(new LwPolylineVertex(v123));
            //Arc22.Vertexes[0].Bulge = -h / 400;
            //fun.PolyFill(dxf, Arc22, 0.08, refin);
            //LwPolyline Arc23 = new LwPolyline();
            //Arc23.Vertexes.Add(new LwPolylineVertex(v125));
            //Arc23.Vertexes.Add(new LwPolylineVertex(v126));
            //Arc23.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc23, 0.08, refin);
            //LwPolyline Arc24 = new LwPolyline();
            //Arc24.Vertexes.Add(new LwPolylineVertex(v71));
            //Arc24.Vertexes.Add(new LwPolylineVertex(v122));
            //Arc24.Vertexes[0].Bulge = -h / 320;
            //fun.PolyFill(dxf, Arc24, 0.08, refin);
            //LwPolyline Arc25 = new LwPolyline();
            //Arc25.Vertexes.Add(new LwPolylineVertex(v123));
            //Arc25.Vertexes.Add(new LwPolylineVertex(v127));
            //Arc25.Vertexes[0].Bulge = -h / 360;
            //fun.PolyFill(dxf, Arc25, 0.08, refin);
            //LwPolyline Arc26 = new LwPolyline();
            //Arc26.Vertexes.Add(new LwPolylineVertex(v125));
            //Arc26.Vertexes.Add(new LwPolylineVertex(v128));
            //Arc26.Vertexes[0].Bulge = -h / 360;
            //fun.PolyFill(dxf, Arc26, 0.08, refin);
            //LwPolyline Arc27 = new LwPolyline();
            //Arc27.Vertexes.Add(new LwPolylineVertex(v122));
            //Arc27.Vertexes.Add(new LwPolylineVertex(v129));
            //Arc27.Vertexes[0].Bulge = -h / 360;
            //fun.PolyFill(dxf, Arc27, 0.08, refin);
            ////
            //LwPolyline Arc28 = new LwPolyline();
            //Arc28.Vertexes.Add(new LwPolylineVertex(v123));
            //Arc28.Vertexes.Add(new LwPolylineVertex(v130));
            //Arc28.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc28, 0.08, refin);
            //LwPolyline Arc29 = new LwPolyline();
            //Arc29.Vertexes.Add(new LwPolylineVertex(v125));
            //Arc29.Vertexes.Add(new LwPolylineVertex(v131));
            //Arc29.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc29, 0.08, refin);
            //LwPolyline Arc30 = new LwPolyline();
            //Arc30.Vertexes.Add(new LwPolylineVertex(v122));
            //Arc30.Vertexes.Add(new LwPolylineVertex(v132));
            //Arc30.Vertexes[0].Bulge = h / 400;
            //fun.PolyFill(dxf, Arc30, 0.08, refin);
            //Vector2[] Line116 = { v130, v133 };
            //fun.drawPlinetype(dxf, Line116, refin, Linetype.Dashed);
            //Vector2[] Line117 = { v131, v134 };
            //fun.drawPlinetype(dxf, Line117, refin, Linetype.Dashed);
            //Vector2[] Line118 = { v132, v135 };
            //fun.drawPlinetype(dxf, Line118, refin, Linetype.Dashed);
            ////
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v1.X - h / 6, v1.Y), new Vector2(v1.X + l1, v1.Y) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v27.X - h / 1.6, v27.Y + h / 22), new Vector2(v19.X + h + h / 6.8, v19.Y - h / 26) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v28.X - h / 1.6, v28.Y - h / 22), new Vector2(v18.X + h + h / 6.8, v18.Y + h / 26) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v49.X, v49.Y - h / 16), new Vector2(v49.X, v49.Y + h + h / 3.8) }, centre, Linetype.Center);
            //DimensionStyle dimensionStyle = fun.CreateDimStyle();
            //dimensionStyle.ArrowSize = 1;
            //dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.TextHeight = 0.8;
            //double offset = 6;
            //LinearDimension dim1 = new LinearDimension(new Line(v6, v7), offset * 3, 90, dimensionStyle);
            //dim1.UserText = "Φ25 ";
            //dxf.AddEntity(dim1);
            //LinearDimension dim2 = new LinearDimension(new Line(v32, v33), offset * 14, 90, dimensionStyle);
            //dim2.UserText = "Φ32 ";
            //dxf.AddEntity(dim2);
            //LinearDimension dim3 = new LinearDimension(new Line(v112, v113), offset * 3, 270, dimensionStyle);
            //dim3.UserText = "Φ21 ";
            //dxf.AddEntity(dim3);
            //LinearDimension dim4 = new LinearDimension(new Line(v70, v113), offset * 3, 360, dimensionStyle);
            //dim4.UserText = "105 ";
            //dxf.AddEntity(dim4);
            //LinearDimension dim5 = new LinearDimension(new Line(v32, v113), offset * 5, 360, dimensionStyle);
            //dim5.UserText = "125 ";
            //dxf.AddEntity(dim5);
            //LinearDimension dim6 = new LinearDimension(new Line(v7, v32), offset * 8, 360, dimensionStyle);
            //dim6.UserText = "56 ";
            //dxf.AddEntity(dim6);
            //
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint46(Dictionary<string, Object> data)   //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 25;
            double pi = Math.PI;
            double epsr = 140 * pi / 180;
            double h1 = 32;
            double h3 = 21;
            double l1 = 56;
            double l2 = 125;
            double l3 = 105;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h / 4);
            Vector2 v3 = new Vector2(v1.X, v1.Y - h / 4);
            //
            Vector2 v4 = new Vector2(v2.X, v2.Y + h / 4);
            Vector2 v5 = new Vector2(v3.X, v3.Y - h / 4);
            //
            Vector2 v6 = new Vector2(v4.X + h / 10, v4.Y + h / 8);
            Vector2 v7 = new Vector2(v5.X + h / 10, v5.Y - h / 8);
            //
            Vector2 v8 = new Vector2(v6.X, v6.Y - h / 3);
            Vector2 v9 = new Vector2(v1.X, v8.Y - h / 10);
            //
            Vector2 v10 = new Vector2(v7.X, v7.Y + h / 3);
            Vector2 v11 = new Vector2(v1.X, v10.Y + h / 10);
            //
            Vector2 v12 = new Vector2(v6.X + l1 - h / 10, v6.Y);
            Vector2 v13 = new Vector2(v7.X + l1 - h / 10, v7.Y);
            //
            Vector2 v14 = new Vector2(v8.X + l1 - h / 2.6, v8.Y);
            Vector2 v15 = new Vector2(v10.X + l1 - h / 2.6, v10.Y);
            //
            Vector2 v16 = new Vector2(v8.X + h / 16, v8.Y);
            Vector2 v17 = new Vector2(v10.X + h / 16, v10.Y);
            Vector2 v18 = new Vector2(v17.X + (l1 - h / 2.6) / 2, v17.Y);
            Vector2 v19 = new Vector2(v16.X + (l1 - h / 2.6) / 2, v16.Y);
            Vector2 v20 = new Vector2(v18.X + h / 10, v1.Y);
            Vector2 v21 = new Vector2(v19.X + h / 10, v1.Y);
            //
            Vector2 v22 = new Vector2(v14.X + h / 22, v14.Y - h / 18);
            Vector2 v23 = new Vector2(v15.X + h / 22, v15.Y + h / 18);
            //
            Vector2 v24 = new Vector2(v14.X + (l1 - h / 10) - (l1 - h / 2.6) + h / 16, v14.Y);
            Vector2 v25 = new Vector2(v15.X + (l1 - h / 10) - (l1 - h / 2.6) + h / 16, v15.Y);
            Vector2 v26 = new Vector2(v24.X, v24.Y - h / 12);
            Vector2 v27 = new Vector2(v19.X + h / 30, v19.Y - h / 12);
            //
            Vector2 v28 = new Vector2(v18.X + h / 30, v18.Y + h / 12);
            Vector2 v29 = new Vector2(v25.X, v25.Y + h / 12);
            //
            Vector2 v30 = new Vector2(v1.X, v16.Y + h / 8);
            Vector2 v31 = new Vector2(v1.X, v17.Y - h / 8);
            //第二阶段
            Vector2 v32 = new Vector2(v12.X, v12.Y + (h1 - h));
            Vector2 v33 = new Vector2(v13.X, v13.Y - (h1 - h));
            //圆弧里得斜坡(上）
            Vector2 v34 = new Vector2(v19.X + h + h / 6.8 + h / 30, v19.Y - h / 26);
            Vector2 v35 = new Vector2(v19.X + h + h / 6.8, v27.Y);
            //
            Vector2 v36 = new Vector2(v34.X, v34.Y + h / 16);
            //
            Vector2 v37 = new Vector2(v19.X + h + h / 6.8 + h / 30, v25.Y + h / 26);
            Vector2 v38 = new Vector2(v19.X + h + h / 6.8, v29.Y);
            //
            Vector2 v39 = new Vector2(v37.X, v33.Y - h / 26);
            //
            Vector2 v40 = new Vector2(v29.X, v23.Y + h + h / 22);
            Vector2 v41 = new Vector2(v29.X, v25.Y - h / 20);
            //
            Vector2 v42 = new Vector2(v39.X + (l2 - l3) / 2, v39.Y);
            //
            Vector2 v43 = new Vector2(v42.X, v37.Y);
            //
            Vector2 v44 = new Vector2(v41.X + ((l2 - l3) / 2) * 2.3 / 3, v41.Y);
            Vector2 v45 = new Vector2(v44.X, v25.Y);
            Vector2 v46 = new Vector2(v45.X - h / 36, v37.Y);
            Vector2 v47 = new Vector2(v45.X, v37.Y);
            Vector2 v48 = new Vector2(v42.X, v25.Y);
            //
            Vector2 v49 = new Vector2(v41.X + (((l2 - l3) / 2) * 2.3 / 3) / 2, v41.Y - h / 16);
            Vector2 v50 = new Vector2(v44.X - (((l2 - l3) / 2) * 2.3 / 3) / 2, v44.Y - h / 16);
            //
            Vector2 v51 = new Vector2(v46.X + h / 36, v46.Y + h / 26);
            Vector2 v52 = new Vector2(v42.X, v51.Y);
            //
            Vector2 v53 = new Vector2(v32.X + (l2 - l3) / 2, v32.Y);
            Vector2 v54 = new Vector2(v53.X, v12.Y - h / 3.6);
            Vector2 v55 = new Vector2(v54.X - h / 2.707, v54.Y);
            Vector2 v56 = new Vector2(v55.X, v55.Y - h / 32);
            //
            Vector2 v57 = new Vector2(v32.X + (l2 - l3) / 6, v32.Y);
            Vector2 v58 = new Vector2(v57.X, v57.Y - h / 6);
            Vector2 v59 = new Vector2(v32.X + (l2 - l3) / 2.6, v32.Y);
            Vector2 v60 = new Vector2(v59.X, v57.Y - h / 6);
            Vector2 v61 = new Vector2(v49.X, v60.Y - h / 20);
            //
            Vector2 v62 = new Vector2(v54.X - h / 12, v54.Y);
            Vector2 v63 = new Vector2(v62.X - h / 20, v62.Y - h / 10.5);
            //
            Vector2 v64 = new Vector2(v62.X + h / 8, v62.Y - h / 20);
            Vector2 v65 = new Vector2(v54.X, v54.Y - h / 36);
            //
            Vector2 v66 = new Vector2(v51.X, v51.Y + h / 2.4);
            //
            Vector2 v67 = new Vector2(v66.X, v66.Y - (h / 2.4) / 2.3);
            //
            Vector2 v68 = new Vector2(v64.X + ((l2 - l3) / 2) * 2 / 3, v64.Y);
            Vector2 v69 = new Vector2(v68.X, v68.Y + (h1 - h));
            Vector2 v70 = new Vector2(v68.X + ((l2 - l3) / 2) * 1 / 3, v68.Y);
            //
            Vector2 v71 = new Vector2(v66.X, v66.Y + h / 8.3);
            //
            Vector2 v72 = new Vector2(v66.X - h / 26, v66.Y - (h / 2.4) / 3.2);
            Vector2 v73 = new Vector2(v48.X, v48.Y + h / 24);
            //
            Vector2 v74 = new Vector2(v73.X + (((l2 - l3) / 2) * 2.3 / 3.3) / 1.8, v73.Y - (((l2 - l3) / 2) * 2.3 / 3) / 2.6);
            //上半
            Vector2 v75 = new Vector2(v53.X + h / 36, v53.Y);
            Vector2 v76 = new Vector2(v75.X + ((l2 - l3) / 2) * 2.8 / 3.2, v75.Y - ((l2 - l3) / 2) * 2.6 / 3.6);
            Vector2 v77 = new Vector2(v76.X, v76.Y - h / 7);
            Vector2 v78 = new Vector2(v76.X + h / 8, v76.Y - h / 30);
            //
            Vector2 v79 = new Vector2(v78.X + l3 / 3, v78.Y);
            Vector2 v80 = new Vector2(v78.X, v78.Y - h / 3.2);
            //
            Vector2 v81 = new Vector2(v42.X + ((l2 - l3) / 2) * 2.8 / 3.2, v42.Y + ((l2 - l3) / 2) * 2.6 / 3.6);
            Vector2 v82 = new Vector2(v81.X + h / 8, v81.Y + h / 30);
            Vector2 v83 = new Vector2(v82.X + l3 / 3, v82.Y);
            Vector2 v84 = new Vector2(v81.X, v81.Y + h / 4);
            Vector2 v85 = new Vector2(v82.X, v82.Y + h / 4.7);
            //中间
            Vector2 v86 = new Vector2(v67.X + h / 4, v67.Y - h / 4);
            Vector2 v87 = new Vector2(v86.X, v86.Y - h / 6.3);
            Vector2 v88 = new Vector2(v86.X + h / 12, v86.Y - h / 16);
            Vector2 v89 = new Vector2(v88.X + h / 20, v88.Y + h / 2.1);
            Vector2 v90 = new Vector2(v89.X - h / 36, v89.Y);
            Vector2 v91 = new Vector2(v90.X, v90.Y + h / 8);
            Vector2 v92 = new Vector2(v90.X - h / 10, v90.Y + h / 9);
            Vector2 v93 = new Vector2(v89.X + h / 36, v89.Y + h / 9);
            //
            Vector2 v94 = new Vector2(v90.X - h / 5, v90.Y - h / 3.1);
            Vector2 v95 = new Vector2(v90.X - h / 3, v90.Y);
            //下边
            Vector2 v96 = new Vector2(v85.X + l3 * 2 / 3, v85.Y - h / 36);
            Vector2 v97 = new Vector2(v88.X + l3 * 2 / 2.9, v85.Y);
            //
            Vector2 v98 = new Vector2(v90.X + l3 / 4.6, v90.Y - h / 10);
            //
            Vector2 v99 = new Vector2(v96.X + l3 / 3 - l3 / 8, v96.Y - h / 6);
            Vector2 v100 = new Vector2(v99.X + l3 / 8, v99.Y);
            //
            Vector2 v101 = new Vector2(v79.X + l3 * 2 / 3, v79.Y + h / 80);
            Vector2 v102 = new Vector2(v101.X - l2 / 9, v1.Y + h / 6);
            Vector2 v103 = new Vector2(v102.X + h / 6, v102.Y + h / 8);
            Vector2 v104 = new Vector2(v103.X - h / 26, v101.Y);
            Vector2 v105 = new Vector2(v101.X - l2 / 3.2, v1.Y + h / 2.15);
            Vector2 v106 = new Vector2(v103.X - h / 1.9, v103.Y);
            Vector2 v107 = new Vector2(v102.X, v102.Y + h / 8);
            //
            Vector2 v108 = new Vector2(v101.X + h / 22, v101.Y - h / 3.2);
            Vector2 v109 = new Vector2(v108.X - h / 3, v108.Y - h / 30);
            Vector2 v110 = new Vector2(v109.X - h / 24, v101.Y);
            //下底右边
            Vector2 v111 = new Vector2(v108.X - h / 23, v108.Y - h / 200);
            Vector2 v112 = new Vector2(v111.X, v111.Y - h3 - h / 28);
            //上侧斜边
            Vector2 v113 = new Vector2(v110.X + h / 3.07, v110.Y + h / 40);
            //
            Vector2 v114 = new Vector2(v111.X - (h / 23) * 1.3, v111.Y - (h / 200) * 1.3);
            Vector2 v115 = new Vector2(v114.X, v114.Y - h3 / 1.2);
            //
            Vector2 v116 = new Vector2(v101.X + h / 40, v115.Y + h / 5.6);
            Vector2 v117 = new Vector2(v108.X - h / 3.1, v116.Y - h / 30);
            Vector2 v118 = new Vector2(v109.X - h / 40, v117.Y + h / 3.5);
            Vector2 v119 = new Vector2(v110.X + h / 3.1, v118.Y + h / 40);
            //虚线段
            Vector2 v120 = new Vector2(v1.X + l1, v1.Y);
            Vector2 v121 = new Vector2(v120.X + l2 + h / 3, v120.Y);
            //*/
            Vector2 v122 = new Vector2(v120.X + l2 / 1.2, v120.Y);
            Vector2 v123 = new Vector2(v120.X + l2 / 1.6, v120.Y);
            Vector2 v124 = new Vector2(v52.X, v37.Y);
            Vector2 v125 = new Vector2(v120.X + l2 / 1.4, v120.Y);
            //
            Vector2 v126 = new Vector2(v89.X - h / 36, v89.Y + h / 20);
            Vector2 v127 = new Vector2(v123.X + h * 1.59, v123.Y + h / 3.7);
            //
            Vector2 v128 = new Vector2(v127.X + h / 9, v123.Y + h / 4);
            Vector2 v129 = new Vector2(v128.X + h / 3.5, v128.Y - h / 10);
            //
            Vector2 v130 = new Vector2(v123.X + h * 1.3, v1.Y - h / 5);
            Vector2 v131 = new Vector2(v123.X + h * 1.3, v1.Y - h / 7);
            Vector2 v132 = new Vector2(v123.X + h * 1.3, v1.Y - h / 20);
            //
            Vector2 v133 = new Vector2(v130.X + h / 1.44, v130.Y + h / 16);
            Vector2 v134 = new Vector2(v131.X + h / 1.46, v131.Y + h / 16);
            Vector2 v135 = new Vector2(v132.X + h / 1.46, v132.Y + h / 16);
            //线段
            //主视图
            Vector2[] Line1 = { v1, v2 };
            fun.drawBLine(dxf, Line1, 0.5, contour);
            Vector2[] Line2 = { v1, v3 };
            fun.drawBLine(dxf, Line2, 0.5, contour);
            Vector2[] Line3 = { v2, v4 };
            fun.drawBLine(dxf, Line3, 0.5, contour);
            Vector2[] Line4 = { v3, v5 };
            fun.drawBLine(dxf, Line4, 0.5, contour);
            Vector2[] Line5 = { v4, v6 };
            fun.drawBLine(dxf, Line5, 0.5, contour);
            Vector2[] Line6 = { v5, v7 };
            fun.drawBLine(dxf, Line6, 0.5, contour);
            Vector2[] Line7 = { v6, v8 };
            fun.drawBLine(dxf, Line7, 0.5, contour);
            //
            Vector2[] Line8 = { v9, v8 };
            fun.drawBLine(dxf, Line8, 0.5, contour);
            //
            Vector2[] Line9 = { v7, v10 };
            fun.drawBLine(dxf, Line9, 0.5, contour);
            Vector2[] Line10 = { v11, v10 };
            fun.drawBLine(dxf, Line10, 0.5, contour);
            //
            Vector2[] Line11 = { v12, v6 };
            fun.drawBLine(dxf, Line11, 0.5, contour);
            Vector2[] Line12 = { v13, v7 };
            fun.drawBLine(dxf, Line12, 0.5, contour);
            //Vector2[] Line13 = { v13, v12 };
            //fun.drawBLine(dxf, Line13, 0.15, contour);
            //
            Vector2[] Line14 = { v14, v8 };
            fun.drawBLine(dxf, Line14, 0.5, contour);
            Vector2[] Line15 = { v14, v15 };
            fun.drawBLine(dxf, Line15, 0.5, contour);
            Vector2[] Line16 = { v15, v10 };
            fun.drawBLine(dxf, Line16, 0.5, contour);
            //
            //Vector2[] Line17 = { v17, v16 };
            //fun.drawPlinetype(dxf, Line17, refin, Linetype.Dashed);
            //Vector2[] Line18 = { v17, v18 };
            //fun.drawPlinetype(dxf, Line18, refin, Linetype.Dashed);
            //Vector2[] Line19 = { v16, v19 };
            //fun.drawPlinetype(dxf, Line19, refin, Linetype.Dashed);
            //Vector2[] Line20 = { v18, v19 };
            //fun.drawPlinetype(dxf, Line20, refin, Linetype.Dashed);
            //Vector2[] Line21 = { v18, v20 };
            //fun.drawPlinetype(dxf, Line21, refin, Linetype.Dashed);
            //Vector2[] Line22 = { v19, v21 };
            //fun.drawPlinetype(dxf, Line22, refin, Linetype.Dashed);
            //
            Vector2[] Line23 = { v14, v22 };
            fun.drawBLine(dxf, Line23, 0.5, contour);
            Vector2[] Line24 = { v15, v23 };
            fun.drawBLine(dxf, Line24, 0.5, contour);
            Vector2[] Line25 = { v22, v23 };
            fun.drawBLine(dxf, Line25, 0.5, contour);
            //Vector2[] Line26 = { v14, v24 };
            //fun.drawPlinetype(dxf, Line26, refin, Linetype.Dashed);
            //Vector2[] Line27 = { v15, v25 };
            //fun.drawPlinetype(dxf, Line27, refin, Linetype.Dashed);
            //Vector2[] Line28 = { v26, v27 };
            //fun.drawPlinetype(dxf, Line28, refin, Linetype.Dashed);
            //Vector2[] Line29 = { v28, v29 };
            //fun.drawPlinetype(dxf, Line29, refin, Linetype.Dashed);
            //LwPolyline Arc1 = new LwPolyline();
            //Arc1.Vertexes.Add(new LwPolylineVertex(v24));
            //Arc1.Vertexes.Add(new LwPolylineVertex(v26));
            //Arc1.Vertexes[0].Bulge = -h / 36;
            //fun.PolyFill(dxf, Arc1, 0.08, refin);
            //LwPolyline Arc2 = new LwPolyline();
            //Arc2.Vertexes.Add(new LwPolylineVertex(v25));
            //Arc2.Vertexes.Add(new LwPolylineVertex(v29));
            //Arc2.Vertexes[0].Bulge = h / 36;
            //fun.PolyFill(dxf, Arc2, 0.08, refin);
            //Vector2[] Line30 = { v16, v30 };
            //fun.drawBLine(dxf, Line30, 0.08, refin);
            //Vector2[] Line31 = { v17, v31 };
            //fun.drawBLine(dxf, Line31, 0.08, refin);
            //
            //Vector2[] Line32 = { v32, v12 };
            //fun.drawBLine(dxf, Line32, 0.15, contour);
            //Vector2[] Line33 = { v33, v13 };
            //fun.drawBLine(dxf, Line33, 0.15, contour);
            //Vector2[] Line34 = { v34, v35 };
            //fun.drawBLine(dxf, Line34, 0.15, contour);
            //Vector2[] Line35 = { v34, v36 };
            //fun.drawBLine(dxf, Line35, 0.15, contour);
            //Vector2[] Line36 = { v37, v38 };
            //fun.drawBLine(dxf, Line36, 0.15, contour);
            //Vector2[] Line37 = { v39, v37 };
            //fun.drawBLine(dxf, Line37, 0.15, contour);
            //Vector2[] Line38 = { v39, v33 };
            //fun.drawBLine(dxf, Line38, 0.15, contour);
            //Vector2[] Line39 = { v26, v29 };
            //fun.drawPlinetype(dxf, Line39, refin, Linetype.Dashed);
            //Vector2[] Line40 = { v24, v40 };
            //fun.drawPlinetype(dxf, Line40, refin, Linetype.Dashed);
            //Vector2[] Line41 = { v32, v40 };
            //fun.drawPlinetype(dxf, Line41, refin, Linetype.Dashed);
            //Vector2[] Line42 = { v25, v41 };
            //fun.drawBLine(dxf, Line42, 0.08, skdimensioning);
            //Vector2[] Line43 = { v42, v39 };
            //fun.drawBLine(dxf, Line43, 0.15, contour);
            //Vector2[] Line44 = { v42, v43 };
            //fun.drawBLine(dxf, Line44, 0.15, contour);
            //Vector2[] Line45 = { v37, v43 };
            //fun.drawBLine(dxf, Line45, 0.15, contour);
            //Vector2[] Line46 = { v41, v44 };
            //fun.drawBLine(dxf, Line46, 0.08, skdimensioning);
            //Vector2[] Line47 = { v45, v44 };
            //fun.drawBLine(dxf, Line47, 0.08, skdimensioning);
            //Vector2[] Line48 = { v45, v46 };
            //fun.drawBLine(dxf, Line48, 0.08, skdimensioning);
            //Vector2[] Line49 = { v45, v47 };
            //fun.drawBLine(dxf, Line49, 0.08, skdimensioning);
            //Vector2[] Line50 = { v48, v45 };
            //fun.drawBLine(dxf, Line50, 0.08, skdimensioning);
            //Vector2[] Line51 = { v49, v41 };
            //fun.drawBLine(dxf, Line51, 0.08, skdimensioning);
            //Vector2[] Line52 = { v50, v44 };
            //fun.drawBLine(dxf, Line52, 0.08, skdimensioning);
            //Vector2[] Line53 = { v51, v46 };
            //fun.drawBLine(dxf, Line53, 0.08, skdimensioning);
            //Vector2[] Line54 = { v51, v47 };
            //fun.drawBLine(dxf, Line54, 0.08, skdimensioning);
            //Vector2[] Line55 = { v51, v52 };
            //fun.drawBLine(dxf, Line55, 0.08, skdimensioning);
            //Vector2[] Line56 = { v48, v52 };
            //fun.drawBLine(dxf, Line56, 0.08, skdimensioning);
            //Vector2[] Line57 = { v32, v53 };
            //fun.drawBLine(dxf, Line57, 0.15, contour);
            //Vector2[] Line58 = { v54, v53 };
            //fun.drawBLine(dxf, Line58, 0.15, contour);
            //Vector2[] Line59 = { v54, v55 };
            //fun.drawBLine(dxf, Line59, 0.15, contour);
            //Vector2[] Line60 = { v56, v55 };
            //fun.drawBLine(dxf, Line60, 0.15, contour);
            //Vector2[] Line61 = { v57, v58 };
            //fun.drawPlinetype(dxf, Line61, refin, Linetype.Dashed);
            //Vector2[] Line62 = { v59, v60 };
            //fun.drawPlinetype(dxf, Line62, refin, Linetype.Dashed);
            //Vector2[] Line63 = { v58, v60 };
            //fun.drawPlinetype(dxf, Line63, refin, Linetype.Dashed);
            //Vector2[] Line64 = { v61, v60 };
            //fun.drawPlinetype(dxf, Line64, refin, Linetype.Dashed);
            //Vector2[] Line65 = { v61, v58 };
            //fun.drawPlinetype(dxf, Line65, refin, Linetype.Dashed);
            //LwPolyline Arc3 = new LwPolyline();
            //Arc3.Vertexes.Add(new LwPolylineVertex(v53));
            //Arc3.Vertexes.Add(new LwPolylineVertex(v62));
            //Arc3.Vertexes[0].Bulge = h / 200;
            //fun.PolyFill(dxf, Arc3, 0.15, contour);
            //Vector2[] Line66 = { v63, v62 };
            //fun.drawBLine(dxf, Line66, 0.15, contour);
            //Vector2[] Line67 = { v34, v63 };
            //fun.drawBLine(dxf, Line67, 0.15, contour);
            //Vector2[] Line68 = { v64, v62 };
            //fun.drawBLine(dxf, Line68, 0.15, contour);
            //Vector2[] Line69 = { v65, v54 };
            //fun.drawBLine(dxf, Line69, 0.15, contour);
            //Vector2[] Line70 = { v66, v51 };
            //fun.drawBLine(dxf, Line70, 0.08, skdimensioning);
            //
            //LwPolyline Arc4 = new LwPolyline();
            //Arc4.Vertexes.Add(new LwPolylineVertex(v63));
            //Arc4.Vertexes.Add(new LwPolylineVertex(v67));
            //Arc4.Vertexes[0].Bulge = h / 200;
            //fun.PolyFill(dxf, Arc4, 0.15, contour);
            //Vector2[] Line71 = { v64, v68 };
            //fun.drawBLine(dxf, Line71, 0.15, contour);
            //Vector2[] Line72 = { v69, v68 };
            //fun.drawBLine(dxf, Line72, 0.15, contour);
            //LwPolyline Arc5 = new LwPolyline();
            //Arc5.Vertexes.Add(new LwPolylineVertex(v53));
            //Arc5.Vertexes.Add(new LwPolylineVertex(v69));
            //Arc5.Vertexes[0].Bulge = -h / 180;
            //fun.PolyFill(dxf, Arc5, 0.15, contour);
            //Vector2[] Line73 = { v70, v68 };
            //fun.drawBLine(dxf, Line73, 0.15, contour);
            //LwPolyline Arc6 = new LwPolyline();
            //Arc6.Vertexes.Add(new LwPolylineVertex(v66));
            //Arc6.Vertexes.Add(new LwPolylineVertex(v71));
            //Arc6.Vertexes[0].Bulge = -h / 80;
            //fun.PolyFill(dxf, Arc6, 0.08, skdimensioning);
            //Vector2[] Line74 = { v71, v66 };
            //fun.drawBLine(dxf, Line74, 0.08, skdimensioning);
            //LwPolyline Arc7 = new LwPolyline();
            //Arc7.Vertexes.Add(new LwPolylineVertex(v69));
            //Arc7.Vertexes.Add(new LwPolylineVertex(v70));
            //Arc7.Vertexes[0].Bulge = -h / 200;
            //fun.PolyFill(dxf, Arc7, 0.15, contour);
            //Vector2[] Line75 = { v73, v72 };
            //fun.drawBLine(dxf, Line75, 0.15, contour);
            //Vector2[] Line76 = { v73, v74 };
            //fun.drawBLine(dxf, Line76, 0.15, contour);
            //Vector2[] Line77 = { v75, v76 };
            //fun.drawBLine(dxf, Line77, 0.15, contour);
            //Vector2[] Line78 = { v75, v53 };
            //fun.drawBLine(dxf, Line78, 0.15, contour);
            //Vector2[] Line79 = { v76, v77 };
            //fun.drawBLine(dxf, Line79, 0.15, contour);
            //LwPolyline Arc8 = new LwPolyline();
            //Arc8.Vertexes.Add(new LwPolylineVertex(v76));
            //Arc8.Vertexes.Add(new LwPolylineVertex(v78));
            //Arc8.Vertexes[0].Bulge = h / 160;
            //fun.PolyFill(dxf, Arc8, 0.15, contour);
            //Vector2[] Line80 = { v78, v79 };
            //fun.drawBLine(dxf, Line80, 0.15, contour);
            //Vector2[] Line81 = { v78, v80 };
            //fun.drawBLine(dxf, Line81, 0.15, contour);
            ////
            //Vector2[] Line82 = { v70, v80 };
            //fun.drawBLine(dxf, Line82, 0.15, contour);
            //Vector2[] Line83 = { v42, v81 };
            //fun.drawBLine(dxf, Line83, 0.15, contour);
            //LwPolyline Arc9 = new LwPolyline();
            //Arc9.Vertexes.Add(new LwPolylineVertex(v81));
            //Arc9.Vertexes.Add(new LwPolylineVertex(v82));
            //Arc9.Vertexes[0].Bulge = -h / 160;
            //fun.PolyFill(dxf, Arc9, 0.15, contour);
            //Vector2[] Line84 = { v83, v82 };
            //fun.drawBLine(dxf, Line84, 0.15, contour);
            //Vector2[] Line85 = { v84, v81 };
            //fun.drawBLine(dxf, Line85, 0.15, contour);
            //LwPolyline Arc10 = new LwPolyline();
            //Arc10.Vertexes.Add(new LwPolylineVertex(v74));
            //Arc10.Vertexes.Add(new LwPolylineVertex(v84));
            //Arc10.Vertexes[0].Bulge = h / 100;
            //fun.PolyFill(dxf, Arc10, 0.15, contour);
            //Vector2[] Line86 = { v85, v82 };
            //fun.drawBLine(dxf, Line86, 0.15, contour);
            //LwPolyline Arc11 = new LwPolyline();
            //Arc11.Vertexes.Add(new LwPolylineVertex(v85));
            //Arc11.Vertexes.Add(new LwPolylineVertex(v84));
            //Arc11.Vertexes[0].Bulge = h / 120;
            //fun.PolyFill(dxf, Arc11, 0.15, contour);
            //Vector2[] Line87 = { v86, v67 };
            //fun.drawBLine(dxf, Line87, 0.15, contour);
            //Vector2[] Line88 = { v86, v87 };
            //fun.drawBLine(dxf, Line88, 0.15, contour);
            //Vector2[] Line89 = { v86, v88 };
            //fun.drawBLine(dxf, Line89, 0.15, contour);
            //Vector2[] Line90 = { v89, v88 };
            //fun.drawBLine(dxf, Line90, 0.15, contour);
            //Vector2[] Line91 = { v89, v90 };
            //fun.drawBLine(dxf, Line91, 0.15, contour);
            //Vector2[] Line92 = { v91, v90 };
            //fun.drawBLine(dxf, Line92, 0.15, contour);
            //Vector2[] Line93 = { v92, v90 };
            //fun.drawBLine(dxf, Line93, 0.15, contour);
            //Vector2[] Line94 = { v93, v89 };
            //fun.drawBLine(dxf, Line94, 0.15, contour);
            //LwPolyline Arc12 = new LwPolyline();
            //Arc12.Vertexes.Add(new LwPolylineVertex(v90));
            //Arc12.Vertexes.Add(new LwPolylineVertex(v94));
            //Arc12.Vertexes[0].Bulge = h / 80;
            //fun.PolyFill(dxf, Arc12, 0.15, contour);
            //Vector2[] Line95 = { v90, v95 };
            //fun.drawPlinetype(dxf, Line95, refin, Linetype.Dashed);
            //LwPolyline Arc13 = new LwPolyline();
            //Arc13.Vertexes.Add(new LwPolylineVertex(v85));
            //Arc13.Vertexes.Add(new LwPolylineVertex(v96));
            //Arc13.Vertexes[0].Bulge = h / 180;
            //fun.PolyFill(dxf, Arc13, 0.15, contour);
            //LwPolyline Arc14 = new LwPolyline();
            //Arc14.Vertexes.Add(new LwPolylineVertex(v88));
            //Arc14.Vertexes.Add(new LwPolylineVertex(v97));
            //Arc14.Vertexes[0].Bulge = h / 160;
            //fun.PolyFill(dxf, Arc14, 0.15, contour);
            //Vector2[] Line96 = { v96, v80 };
            //fun.drawBLine(dxf, Line96, 0.15, contour);
            //Vector2[] Line97 = { v98, v90 };
            //fun.drawBLine(dxf, Line97, 0.15, contour);
            //LwPolyline Arc15 = new LwPolyline();
            //Arc15.Vertexes.Add(new LwPolylineVertex(v96));
            //Arc15.Vertexes.Add(new LwPolylineVertex(v99));
            //Arc15.Vertexes[0].Bulge = h / 260;
            //fun.PolyFill(dxf, Arc15, 0.15, contour);
            //Vector2[] Line98 = { v100, v99 };
            //fun.drawBLine(dxf, Line98, 0.15, contour);
            //Vector2[] Line99 = { v101, v79 };
            //fun.drawBLine(dxf, Line99, 0.07, contour);
            //LwPolyline Arc16 = new LwPolyline();
            //Arc16.Vertexes.Add(new LwPolylineVertex(v79));
            //Arc16.Vertexes.Add(new LwPolylineVertex(v102));
            //Arc16.Vertexes[0].Bulge = -h / 260;
            //fun.PolyFill(dxf, Arc16, 0.15, contour);
            //LwPolyline Arc17 = new LwPolyline();
            //Arc17.Vertexes.Add(new LwPolylineVertex(v103));
            //Arc17.Vertexes.Add(new LwPolylineVertex(v102));
            //Arc17.Vertexes[0].Bulge = -h / 44;
            //fun.PolyFill(dxf, Arc17, 0.15, contour);
            //Vector2[] Line100 = { v103, v104 };
            //fun.drawBLine(dxf, Line100, 0.15, contour);
            //LwPolyline Arc18 = new LwPolyline();
            //Arc18.Vertexes.Add(new LwPolylineVertex(v104));
            //Arc18.Vertexes.Add(new LwPolylineVertex(v105));
            //Arc18.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc18, 0.15, contour);
            //Vector2[] Line101 = { v103, v106 };
            //fun.drawBLine(dxf, Line101, 0.15, contour);
            //Vector2[] Line102 = { v102, v107 };
            //fun.drawBLine(dxf, Line102, 0.15, contour);
            //Vector2[] Line103 = { v101, v108 };
            //fun.drawBLine(dxf, Line103, 0.15, contour);
            //Vector2[] Line104 = { v109, v108 };
            //fun.drawBLine(dxf, Line104, 0.15, contour);
            //Vector2[] Line105 = { v109, v110 };
            //fun.drawBLine(dxf, Line105, 0.15, contour);
            //Vector2[] Line106 = { v111, v112 };
            //fun.drawBLine(dxf, Line106, 0.2, contour);
            //Vector2[] Line107 = { v110, v113 };
            //fun.drawBLine(dxf, Line107, 0.15, contour);
            //Vector2[] Line108 = { v101, v113 };
            //fun.drawBLine(dxf, Line108, 0.15, contour);
            //Vector2[] Line109 = { v114, v115 };
            //fun.drawBLine(dxf, Line109, 0.15, contour);
            //Vector2[] Line110 = { v112, v115 };
            //fun.drawBLine(dxf, Line110, 0.15, contour);
            ////
            //Vector2[] Line111 = { v116, v117 };
            //fun.drawBLine(dxf, Line111, 0.15, contour);
            //Vector2[] Line112 = { v118, v117 };
            //fun.drawBLine(dxf, Line112, 0.15, contour);
            //Vector2[] Line113 = { v118, v119 };
            //fun.drawBLine(dxf, Line113, 0.15, contour);
            //Vector2[] Line114 = { v116, v119 };
            //fun.drawBLine(dxf, Line114, 0.15, contour);
            //Vector2[] Line115 = { v120, v121 };
            //fun.drawBLine(dxf, Line115, 0.08, skdimensioning);
            ////
            //LwPolyline Arc19 = new LwPolyline();
            //Arc19.Vertexes.Add(new LwPolylineVertex(v48));
            //Arc19.Vertexes.Add(new LwPolylineVertex(v122));
            //Arc19.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc19, 0.08, refin);
            //LwPolyline Arc20 = new LwPolyline();
            //Arc20.Vertexes.Add(new LwPolylineVertex(v52));
            //Arc20.Vertexes.Add(new LwPolylineVertex(v123));
            //Arc20.Vertexes[0].Bulge = h / 300;
            //fun.PolyFill(dxf, Arc20, 0.08, refin);
            //LwPolyline Arc21 = new LwPolyline();
            //Arc21.Vertexes.Add(new LwPolylineVertex(v125));
            //Arc21.Vertexes.Add(new LwPolylineVertex(v124));
            //Arc21.Vertexes[0].Bulge = -h / 320;
            //fun.PolyFill(dxf, Arc21, 0.08, refin);
            ////
            //LwPolyline Arc22 = new LwPolyline();
            //Arc22.Vertexes.Add(new LwPolylineVertex(v90));
            //Arc22.Vertexes.Add(new LwPolylineVertex(v123));
            //Arc22.Vertexes[0].Bulge = -h / 400;
            //fun.PolyFill(dxf, Arc22, 0.08, refin);
            //LwPolyline Arc23 = new LwPolyline();
            //Arc23.Vertexes.Add(new LwPolylineVertex(v125));
            //Arc23.Vertexes.Add(new LwPolylineVertex(v126));
            //Arc23.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc23, 0.08, refin);
            //LwPolyline Arc24 = new LwPolyline();
            //Arc24.Vertexes.Add(new LwPolylineVertex(v71));
            //Arc24.Vertexes.Add(new LwPolylineVertex(v122));
            //Arc24.Vertexes[0].Bulge = -h / 320;
            //fun.PolyFill(dxf, Arc24, 0.08, refin);
            //LwPolyline Arc25 = new LwPolyline();
            //Arc25.Vertexes.Add(new LwPolylineVertex(v123));
            //Arc25.Vertexes.Add(new LwPolylineVertex(v127));
            //Arc25.Vertexes[0].Bulge = -h / 360;
            //fun.PolyFill(dxf, Arc25, 0.08, refin);
            //LwPolyline Arc26 = new LwPolyline();
            //Arc26.Vertexes.Add(new LwPolylineVertex(v125));
            //Arc26.Vertexes.Add(new LwPolylineVertex(v128));
            //Arc26.Vertexes[0].Bulge = -h / 360;
            //fun.PolyFill(dxf, Arc26, 0.08, refin);
            //LwPolyline Arc27 = new LwPolyline();
            //Arc27.Vertexes.Add(new LwPolylineVertex(v122));
            //Arc27.Vertexes.Add(new LwPolylineVertex(v129));
            //Arc27.Vertexes[0].Bulge = -h / 360;
            //fun.PolyFill(dxf, Arc27, 0.08, refin);
            ////
            //LwPolyline Arc28 = new LwPolyline();
            //Arc28.Vertexes.Add(new LwPolylineVertex(v123));
            //Arc28.Vertexes.Add(new LwPolylineVertex(v130));
            //Arc28.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc28, 0.08, refin);
            //LwPolyline Arc29 = new LwPolyline();
            //Arc29.Vertexes.Add(new LwPolylineVertex(v125));
            //Arc29.Vertexes.Add(new LwPolylineVertex(v131));
            //Arc29.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc29, 0.08, refin);
            //LwPolyline Arc30 = new LwPolyline();
            //Arc30.Vertexes.Add(new LwPolylineVertex(v122));
            //Arc30.Vertexes.Add(new LwPolylineVertex(v132));
            //Arc30.Vertexes[0].Bulge = h / 400;
            //fun.PolyFill(dxf, Arc30, 0.08, refin);
            //Vector2[] Line116 = { v130, v133 };
            //fun.drawPlinetype(dxf, Line116, refin, Linetype.Dashed);
            //Vector2[] Line117 = { v131, v134 };
            //fun.drawPlinetype(dxf, Line117, refin, Linetype.Dashed);
            //Vector2[] Line118 = { v132, v135 };
            //fun.drawPlinetype(dxf, Line118, refin, Linetype.Dashed);
            ////
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v1.X - h / 6, v1.Y), new Vector2(v1.X + l1, v1.Y) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v27.X - h / 1.6, v27.Y + h / 22), new Vector2(v19.X + h + h / 6.8, v19.Y - h / 26) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v28.X - h / 1.6, v28.Y - h / 22), new Vector2(v18.X + h + h / 6.8, v18.Y + h / 26) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v49.X, v49.Y - h / 16), new Vector2(v49.X, v49.Y + h + h / 3.8) }, centre, Linetype.Center);
            //DimensionStyle dimensionStyle = fun.CreateDimStyle();
            //dimensionStyle.ArrowSize = 1;
            //dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.TextHeight = 0.8;
            //double offset = 6;
            //LinearDimension dim1 = new LinearDimension(new Line(v6, v7), offset * 3, 90, dimensionStyle);
            //dim1.UserText = "Φ25 ";
            //dxf.AddEntity(dim1);
            //LinearDimension dim2 = new LinearDimension(new Line(v32, v33), offset * 14, 90, dimensionStyle);
            //dim2.UserText = "Φ32 ";
            //dxf.AddEntity(dim2);
            //LinearDimension dim3 = new LinearDimension(new Line(v112, v113), offset * 3, 270, dimensionStyle);
            //dim3.UserText = "Φ21 ";
            //dxf.AddEntity(dim3);
            //LinearDimension dim4 = new LinearDimension(new Line(v70, v113), offset * 3, 360, dimensionStyle);
            //dim4.UserText = "105 ";
            //dxf.AddEntity(dim4);
            //LinearDimension dim5 = new LinearDimension(new Line(v32, v113), offset * 5, 360, dimensionStyle);
            //dim5.UserText = "125 ";
            //dxf.AddEntity(dim5);
            //LinearDimension dim6 = new LinearDimension(new Line(v7, v32), offset * 8, 360, dimensionStyle);
            //dim6.UserText = "56 ";
            //dxf.AddEntity(dim6);
            //
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint47(Dictionary<string, Object> data)   //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 25;
            double pi = Math.PI;
            double epsr = 140 * pi / 180;
            double h1 = 32;
            double h3 = 21;
            double l1 = 56;
            double l2 = 125;
            double l3 = 105;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h / 4);
            Vector2 v3 = new Vector2(v1.X, v1.Y - h / 4);
            //
            Vector2 v4 = new Vector2(v2.X, v2.Y + h / 4);
            Vector2 v5 = new Vector2(v3.X, v3.Y - h / 4);
            //
            Vector2 v6 = new Vector2(v4.X + h / 10, v4.Y + h / 8);
            Vector2 v7 = new Vector2(v5.X + h / 10, v5.Y - h / 8);
            //
            Vector2 v8 = new Vector2(v6.X, v6.Y - h / 3);
            Vector2 v9 = new Vector2(v1.X, v8.Y - h / 10);
            //
            Vector2 v10 = new Vector2(v7.X, v7.Y + h / 3);
            Vector2 v11 = new Vector2(v1.X, v10.Y + h / 10);
            //
            Vector2 v12 = new Vector2(v6.X + l1 - h / 10, v6.Y);
            Vector2 v13 = new Vector2(v7.X + l1 - h / 10, v7.Y);
            //
            Vector2 v14 = new Vector2(v8.X + l1 - h / 2.6, v8.Y);
            Vector2 v15 = new Vector2(v10.X + l1 - h / 2.6, v10.Y);
            //
            Vector2 v16 = new Vector2(v8.X + h / 16, v8.Y);
            Vector2 v17 = new Vector2(v10.X + h / 16, v10.Y);
            Vector2 v18 = new Vector2(v17.X + (l1 - h / 2.6) / 2, v17.Y);
            Vector2 v19 = new Vector2(v16.X + (l1 - h / 2.6) / 2, v16.Y);
            Vector2 v20 = new Vector2(v18.X + h / 10, v1.Y);
            Vector2 v21 = new Vector2(v19.X + h / 10, v1.Y);
            //
            Vector2 v22 = new Vector2(v14.X + h / 22, v14.Y - h / 18);
            Vector2 v23 = new Vector2(v15.X + h / 22, v15.Y + h / 18);
            //
            Vector2 v24 = new Vector2(v14.X + (l1 - h / 10) - (l1 - h / 2.6) + h / 16, v14.Y);
            Vector2 v25 = new Vector2(v15.X + (l1 - h / 10) - (l1 - h / 2.6) + h / 16, v15.Y);
            Vector2 v26 = new Vector2(v24.X, v24.Y - h / 12);
            Vector2 v27 = new Vector2(v19.X + h / 30, v19.Y - h / 12);
            //
            Vector2 v28 = new Vector2(v18.X + h / 30, v18.Y + h / 12);
            Vector2 v29 = new Vector2(v25.X, v25.Y + h / 12);
            //
            Vector2 v30 = new Vector2(v1.X, v16.Y + h / 8);
            Vector2 v31 = new Vector2(v1.X, v17.Y - h / 8);
            //第二阶段
            Vector2 v32 = new Vector2(v12.X, v12.Y + (h1 - h));
            Vector2 v33 = new Vector2(v13.X, v13.Y - (h1 - h));
            //圆弧里得斜坡(上）
            Vector2 v34 = new Vector2(v19.X + h + h / 6.8 + h / 30, v19.Y - h / 26);
            Vector2 v35 = new Vector2(v19.X + h + h / 6.8, v27.Y);
            //
            Vector2 v36 = new Vector2(v34.X, v34.Y + h / 16);
            //
            Vector2 v37 = new Vector2(v19.X + h + h / 6.8 + h / 30, v25.Y + h / 26);
            Vector2 v38 = new Vector2(v19.X + h + h / 6.8, v29.Y);
            //
            Vector2 v39 = new Vector2(v37.X, v33.Y - h / 26);
            //
            Vector2 v40 = new Vector2(v29.X, v23.Y + h + h / 22);
            Vector2 v41 = new Vector2(v29.X, v25.Y - h / 20);
            //
            Vector2 v42 = new Vector2(v39.X + (l2 - l3) / 2, v39.Y);
            //
            Vector2 v43 = new Vector2(v42.X, v37.Y);
            //
            Vector2 v44 = new Vector2(v41.X + ((l2 - l3) / 2) * 2.3 / 3, v41.Y);
            Vector2 v45 = new Vector2(v44.X, v25.Y);
            Vector2 v46 = new Vector2(v45.X - h / 36, v37.Y);
            Vector2 v47 = new Vector2(v45.X, v37.Y);
            Vector2 v48 = new Vector2(v42.X, v25.Y);
            //
            Vector2 v49 = new Vector2(v41.X + (((l2 - l3) / 2) * 2.3 / 3) / 2, v41.Y - h / 16);
            Vector2 v50 = new Vector2(v44.X - (((l2 - l3) / 2) * 2.3 / 3) / 2, v44.Y - h / 16);
            //
            Vector2 v51 = new Vector2(v46.X + h / 36, v46.Y + h / 26);
            Vector2 v52 = new Vector2(v42.X, v51.Y);
            //
            Vector2 v53 = new Vector2(v32.X + (l2 - l3) / 2, v32.Y);
            Vector2 v54 = new Vector2(v53.X, v12.Y - h / 3.6);
            Vector2 v55 = new Vector2(v54.X - h / 2.707, v54.Y);
            Vector2 v56 = new Vector2(v55.X, v55.Y - h / 32);
            //
            Vector2 v57 = new Vector2(v32.X + (l2 - l3) / 6, v32.Y);
            Vector2 v58 = new Vector2(v57.X, v57.Y - h / 6);
            Vector2 v59 = new Vector2(v32.X + (l2 - l3) / 2.6, v32.Y);
            Vector2 v60 = new Vector2(v59.X, v57.Y - h / 6);
            Vector2 v61 = new Vector2(v49.X, v60.Y - h / 20);
            //
            Vector2 v62 = new Vector2(v54.X - h / 12, v54.Y);
            Vector2 v63 = new Vector2(v62.X - h / 20, v62.Y - h / 10.5);
            //
            Vector2 v64 = new Vector2(v62.X + h / 8, v62.Y - h / 20);
            Vector2 v65 = new Vector2(v54.X, v54.Y - h / 36);
            //
            Vector2 v66 = new Vector2(v51.X, v51.Y + h / 2.4);
            //
            Vector2 v67 = new Vector2(v66.X, v66.Y - (h / 2.4) / 2.3);
            //
            Vector2 v68 = new Vector2(v64.X + ((l2 - l3) / 2) * 2 / 3, v64.Y);
            Vector2 v69 = new Vector2(v68.X, v68.Y + (h1 - h));
            Vector2 v70 = new Vector2(v68.X + ((l2 - l3) / 2) * 1 / 3, v68.Y);
            //
            Vector2 v71 = new Vector2(v66.X, v66.Y + h / 8.3);
            //
            Vector2 v72 = new Vector2(v66.X - h / 26, v66.Y - (h / 2.4) / 3.2);
            Vector2 v73 = new Vector2(v48.X, v48.Y + h / 24);
            //
            Vector2 v74 = new Vector2(v73.X + (((l2 - l3) / 2) * 2.3 / 3.3) / 1.8, v73.Y - (((l2 - l3) / 2) * 2.3 / 3) / 2.6);
            //上半
            Vector2 v75 = new Vector2(v53.X + h / 36, v53.Y);
            Vector2 v76 = new Vector2(v75.X + ((l2 - l3) / 2) * 2.8 / 3.2, v75.Y - ((l2 - l3) / 2) * 2.6 / 3.6);
            Vector2 v77 = new Vector2(v76.X, v76.Y - h / 7);
            Vector2 v78 = new Vector2(v76.X + h / 8, v76.Y - h / 30);
            //
            Vector2 v79 = new Vector2(v78.X + l3 / 3, v78.Y);
            Vector2 v80 = new Vector2(v78.X, v78.Y - h / 3.2);
            //
            Vector2 v81 = new Vector2(v42.X + ((l2 - l3) / 2) * 2.8 / 3.2, v42.Y + ((l2 - l3) / 2) * 2.6 / 3.6);
            Vector2 v82 = new Vector2(v81.X + h / 8, v81.Y + h / 30);
            Vector2 v83 = new Vector2(v82.X + l3 / 3, v82.Y);
            Vector2 v84 = new Vector2(v81.X, v81.Y + h / 4);
            Vector2 v85 = new Vector2(v82.X, v82.Y + h / 4.7);
            //中间
            Vector2 v86 = new Vector2(v67.X + h / 4, v67.Y - h / 4);
            Vector2 v87 = new Vector2(v86.X, v86.Y - h / 6.3);
            Vector2 v88 = new Vector2(v86.X + h / 12, v86.Y - h / 16);
            Vector2 v89 = new Vector2(v88.X + h / 20, v88.Y + h / 2.1);
            Vector2 v90 = new Vector2(v89.X - h / 36, v89.Y);
            Vector2 v91 = new Vector2(v90.X, v90.Y + h / 8);
            Vector2 v92 = new Vector2(v90.X - h / 10, v90.Y + h / 9);
            Vector2 v93 = new Vector2(v89.X + h / 36, v89.Y + h / 9);
            //
            Vector2 v94 = new Vector2(v90.X - h / 5, v90.Y - h / 3.1);
            Vector2 v95 = new Vector2(v90.X - h / 3, v90.Y);
            //下边
            Vector2 v96 = new Vector2(v85.X + l3 * 2 / 3, v85.Y - h / 36);
            Vector2 v97 = new Vector2(v88.X + l3 * 2 / 2.9, v85.Y);
            //
            Vector2 v98 = new Vector2(v90.X + l3 / 4.6, v90.Y - h / 10);
            //
            Vector2 v99 = new Vector2(v96.X + l3 / 3 - l3 / 8, v96.Y - h / 6);
            Vector2 v100 = new Vector2(v99.X + l3 / 8, v99.Y);
            //
            Vector2 v101 = new Vector2(v79.X + l3 * 2 / 3, v79.Y + h / 80);
            Vector2 v102 = new Vector2(v101.X - l2 / 9, v1.Y + h / 6);
            Vector2 v103 = new Vector2(v102.X + h / 6, v102.Y + h / 8);
            Vector2 v104 = new Vector2(v103.X - h / 26, v101.Y);
            Vector2 v105 = new Vector2(v101.X - l2 / 3.2, v1.Y + h / 2.15);
            Vector2 v106 = new Vector2(v103.X - h / 1.9, v103.Y);
            Vector2 v107 = new Vector2(v102.X, v102.Y + h / 8);
            //
            Vector2 v108 = new Vector2(v101.X + h / 22, v101.Y - h / 3.2);
            Vector2 v109 = new Vector2(v108.X - h / 3, v108.Y - h / 30);
            Vector2 v110 = new Vector2(v109.X - h / 24, v101.Y);
            //下底右边
            Vector2 v111 = new Vector2(v108.X - h / 23, v108.Y - h / 200);
            Vector2 v112 = new Vector2(v111.X, v111.Y - h3 - h / 28);
            //上侧斜边
            Vector2 v113 = new Vector2(v110.X + h / 3.07, v110.Y + h / 40);
            //
            Vector2 v114 = new Vector2(v111.X - (h / 23) * 1.3, v111.Y - (h / 200) * 1.3);
            Vector2 v115 = new Vector2(v114.X, v114.Y - h3 / 1.2);
            //
            Vector2 v116 = new Vector2(v101.X + h / 40, v115.Y + h / 5.6);
            Vector2 v117 = new Vector2(v108.X - h / 3.1, v116.Y - h / 30);
            Vector2 v118 = new Vector2(v109.X - h / 40, v117.Y + h / 3.5);
            Vector2 v119 = new Vector2(v110.X + h / 3.1, v118.Y + h / 40);
            //虚线段
            Vector2 v120 = new Vector2(v1.X + l1, v1.Y);
            Vector2 v121 = new Vector2(v120.X + l2 + h / 3, v120.Y);
            //*/
            Vector2 v122 = new Vector2(v120.X + l2 / 1.2, v120.Y);
            Vector2 v123 = new Vector2(v120.X + l2 / 1.6, v120.Y);
            Vector2 v124 = new Vector2(v52.X, v37.Y);
            Vector2 v125 = new Vector2(v120.X + l2 / 1.4, v120.Y);
            //
            Vector2 v126 = new Vector2(v89.X - h / 36, v89.Y + h / 20);
            Vector2 v127 = new Vector2(v123.X + h * 1.59, v123.Y + h / 3.7);
            //
            Vector2 v128 = new Vector2(v127.X + h / 9, v123.Y + h / 4);
            Vector2 v129 = new Vector2(v128.X + h / 3.5, v128.Y - h / 10);
            //
            Vector2 v130 = new Vector2(v123.X + h * 1.3, v1.Y - h / 5);
            Vector2 v131 = new Vector2(v123.X + h * 1.3, v1.Y - h / 7);
            Vector2 v132 = new Vector2(v123.X + h * 1.3, v1.Y - h / 20);
            //
            Vector2 v133 = new Vector2(v130.X + h / 1.44, v130.Y + h / 16);
            Vector2 v134 = new Vector2(v131.X + h / 1.46, v131.Y + h / 16);
            Vector2 v135 = new Vector2(v132.X + h / 1.46, v132.Y + h / 16);
            //线段
            //主视图
            //Vector2[] Line1 = { v1, v2 };
            //fun.drawBLine(dxf, Line1, 0.15, contour);
            //Vector2[] Line2 = { v1, v3 };
            //fun.drawBLine(dxf, Line2, 0.15, contour);
            //Vector2[] Line3 = { v2, v4 };
            //fun.drawBLine(dxf, Line3, 0.15, contour);
            //Vector2[] Line4 = { v3, v5 };
            //fun.drawBLine(dxf, Line4, 0.15, contour);
            //Vector2[] Line5 = { v4, v6 };
            //fun.drawBLine(dxf, Line5, 0.15, contour);
            //Vector2[] Line6 = { v5, v7 };
            //fun.drawBLine(dxf, Line6, 0.15, contour);
            //Vector2[] Line7 = { v6, v8 };
            //fun.drawBLine(dxf, Line7, 0.15, contour);
            ////
            //Vector2[] Line8 = { v9, v8 };
            //fun.drawBLine(dxf, Line8, 0.15, contour);
            ////
            //Vector2[] Line9 = { v7, v10 };
            //fun.drawBLine(dxf, Line9, 0.15, contour);
            //Vector2[] Line10 = { v11, v10 };
            //fun.drawBLine(dxf, Line10, 0.15, contour);
            ////
            //Vector2[] Line11 = { v12, v6 };
            //fun.drawBLine(dxf, Line11, 0.15, contour);
            //Vector2[] Line12 = { v13, v7 };
            //fun.drawBLine(dxf, Line12, 0.15, contour);
            //Vector2[] Line13 = { v13, v12 };
            //fun.drawBLine(dxf, Line13, 0.15, contour);
            ////
            //Vector2[] Line14 = { v14, v8 };
            //fun.drawBLine(dxf, Line14, 0.15, contour);
            //Vector2[] Line15 = { v14, v15 };
            //fun.drawBLine(dxf, Line15, 0.15, contour);
            //Vector2[] Line16 = { v15, v10 };
            //fun.drawBLine(dxf, Line16, 0.15, contour);
            ////
            //Vector2[] Line17 = { v17, v16 };
            //fun.drawPlinetype(dxf, Line17, refin, Linetype.Dashed);
            //Vector2[] Line18 = { v17, v18 };
            //fun.drawPlinetype(dxf, Line18, refin, Linetype.Dashed);
            //Vector2[] Line19 = { v16, v19 };
            //fun.drawPlinetype(dxf, Line19, refin, Linetype.Dashed);
            //Vector2[] Line20 = { v18, v19 };
            //fun.drawPlinetype(dxf, Line20, refin, Linetype.Dashed);
            //Vector2[] Line21 = { v18, v20 };
            //fun.drawPlinetype(dxf, Line21, refin, Linetype.Dashed);
            //Vector2[] Line22 = { v19, v21 };
            //fun.drawPlinetype(dxf, Line22, refin, Linetype.Dashed);
            ////
            //Vector2[] Line23 = { v14, v22 };
            //fun.drawBLine(dxf, Line23, 0.15, contour);
            //Vector2[] Line24 = { v15, v23 };
            //fun.drawBLine(dxf, Line24, 0.15, contour);
            //Vector2[] Line25 = { v22, v23 };
            //fun.drawBLine(dxf, Line25, 0.15, contour);
            //Vector2[] Line26 = { v14, v24 };
            //fun.drawPlinetype(dxf, Line26, refin, Linetype.Dashed);
            //Vector2[] Line27 = { v15, v25 };
            //fun.drawPlinetype(dxf, Line27, refin, Linetype.Dashed);
            //Vector2[] Line28 = { v26, v27 };
            //fun.drawPlinetype(dxf, Line28, refin, Linetype.Dashed);
            //Vector2[] Line29 = { v28, v29 };
            //fun.drawPlinetype(dxf, Line29, refin, Linetype.Dashed);
            //LwPolyline Arc1 = new LwPolyline();
            //Arc1.Vertexes.Add(new LwPolylineVertex(v24));
            //Arc1.Vertexes.Add(new LwPolylineVertex(v26));
            //Arc1.Vertexes[0].Bulge = -h / 36;
            //fun.PolyFill(dxf, Arc1, 0.08, refin);
            //LwPolyline Arc2 = new LwPolyline();
            //Arc2.Vertexes.Add(new LwPolylineVertex(v25));
            //Arc2.Vertexes.Add(new LwPolylineVertex(v29));
            //Arc2.Vertexes[0].Bulge = h / 36;
            //fun.PolyFill(dxf, Arc2, 0.08, refin);
            //Vector2[] Line30 = { v16, v30 };
            //fun.drawBLine(dxf, Line30, 0.08, refin);
            //Vector2[] Line31 = { v17, v31 };
            //fun.drawBLine(dxf, Line31, 0.08, refin);
            ////
            //Vector2[] Line32 = { v32, v12 };
            //fun.drawBLine(dxf, Line32, 0.15, contour);
            //Vector2[] Line33 = { v33, v13 };
            //fun.drawBLine(dxf, Line33, 0.15, contour);
            //Vector2[] Line34 = { v34, v35 };
            //fun.drawBLine(dxf, Line34, 0.15, contour);
            //Vector2[] Line35 = { v34, v36 };
            //fun.drawBLine(dxf, Line35, 0.15, contour);
            //Vector2[] Line36 = { v37, v38 };
            //fun.drawBLine(dxf, Line36, 0.15, contour);
            //Vector2[] Line37 = { v39, v37 };
            //fun.drawBLine(dxf, Line37, 0.15, contour);
            //Vector2[] Line38 = { v39, v33 };
            //fun.drawBLine(dxf, Line38, 0.15, contour);
            //Vector2[] Line39 = { v26, v29 };
            //fun.drawPlinetype(dxf, Line39, refin, Linetype.Dashed);
            //Vector2[] Line40 = { v24, v40 };
            //fun.drawPlinetype(dxf, Line40, refin, Linetype.Dashed);
            //Vector2[] Line41 = { v32, v40 };
            //fun.drawPlinetype(dxf, Line41, refin, Linetype.Dashed);
            //Vector2[] Line42 = { v25, v41 };
            //fun.drawBLine(dxf, Line42, 0.08, skdimensioning);
            //Vector2[] Line43 = { v42, v39 };
            //fun.drawBLine(dxf, Line43, 0.15, contour);
            //Vector2[] Line44 = { v42, v43 };
            //fun.drawBLine(dxf, Line44, 0.15, contour);
            //Vector2[] Line45 = { v37, v43 };
            //fun.drawBLine(dxf, Line45, 0.15, contour);
            //Vector2[] Line46 = { v41, v44 };
            //fun.drawBLine(dxf, Line46, 0.08, skdimensioning);
            //Vector2[] Line47 = { v45, v44 };
            //fun.drawBLine(dxf, Line47, 0.08, skdimensioning);
            //Vector2[] Line48 = { v45, v46 };
            //fun.drawBLine(dxf, Line48, 0.08, skdimensioning);
            //Vector2[] Line49 = { v45, v47 };
            //fun.drawBLine(dxf, Line49, 0.08, skdimensioning);
            //Vector2[] Line50 = { v48, v45 };
            //fun.drawBLine(dxf, Line50, 0.08, skdimensioning);
            //Vector2[] Line51 = { v49, v41 };
            //fun.drawBLine(dxf, Line51, 0.08, skdimensioning);
            //Vector2[] Line52 = { v50, v44 };
            //fun.drawBLine(dxf, Line52, 0.08, skdimensioning);
            //Vector2[] Line53 = { v51, v46 };
            //fun.drawBLine(dxf, Line53, 0.08, skdimensioning);
            //Vector2[] Line54 = { v51, v47 };
            //fun.drawBLine(dxf, Line54, 0.08, skdimensioning);
            //Vector2[] Line55 = { v51, v52 };
            //fun.drawBLine(dxf, Line55, 0.08, skdimensioning);
            //Vector2[] Line56 = { v48, v52 };
            //fun.drawBLine(dxf, Line56, 0.08, skdimensioning);
            //Vector2[] Line57 = { v32, v53 };
            //fun.drawBLine(dxf, Line57, 0.15, contour);
            //Vector2[] Line58 = { v54, v53 };
            //fun.drawBLine(dxf, Line58, 0.15, contour);
            //Vector2[] Line59 = { v54, v55 };
            //fun.drawBLine(dxf, Line59, 0.15, contour);
            //Vector2[] Line60 = { v56, v55 };
            //fun.drawBLine(dxf, Line60, 0.15, contour);
            //Vector2[] Line61 = { v57, v58 };
            //fun.drawPlinetype(dxf, Line61, refin, Linetype.Dashed);
            //Vector2[] Line62 = { v59, v60 };
            //fun.drawPlinetype(dxf, Line62, refin, Linetype.Dashed);
            //Vector2[] Line63 = { v58, v60 };
            //fun.drawPlinetype(dxf, Line63, refin, Linetype.Dashed);
            //Vector2[] Line64 = { v61, v60 };
            //fun.drawPlinetype(dxf, Line64, refin, Linetype.Dashed);
            //Vector2[] Line65 = { v61, v58 };
            //fun.drawPlinetype(dxf, Line65, refin, Linetype.Dashed);
            //LwPolyline Arc3 = new LwPolyline();
            //Arc3.Vertexes.Add(new LwPolylineVertex(v53));
            //Arc3.Vertexes.Add(new LwPolylineVertex(v62));
            //Arc3.Vertexes[0].Bulge = h / 200;
            //fun.PolyFill(dxf, Arc3, 0.15, contour);
            //Vector2[] Line66 = { v63, v62 };
            //fun.drawBLine(dxf, Line66, 0.15, contour);
            //Vector2[] Line67 = { v34, v63 };
            //fun.drawBLine(dxf, Line67, 0.15, contour);
            //Vector2[] Line68 = { v64, v62 };
            //fun.drawBLine(dxf, Line68, 0.15, contour);
            //Vector2[] Line69 = { v65, v54 };
            //fun.drawBLine(dxf, Line69, 0.15, contour);
            //Vector2[] Line70 = { v66, v51 };
            //fun.drawBLine(dxf, Line70, 0.08, skdimensioning);
            ////
            //LwPolyline Arc4 = new LwPolyline();
            //Arc4.Vertexes.Add(new LwPolylineVertex(v63));
            //Arc4.Vertexes.Add(new LwPolylineVertex(v67));
            //Arc4.Vertexes[0].Bulge = h / 200;
            //fun.PolyFill(dxf, Arc4, 0.15, contour);
            //Vector2[] Line71 = { v64, v68 };
            //fun.drawBLine(dxf, Line71, 0.15, contour);
            //Vector2[] Line72 = { v69, v68 };
            //fun.drawBLine(dxf, Line72, 0.15, contour);
            //LwPolyline Arc5 = new LwPolyline();
            //Arc5.Vertexes.Add(new LwPolylineVertex(v53));
            //Arc5.Vertexes.Add(new LwPolylineVertex(v69));
            //Arc5.Vertexes[0].Bulge = -h / 180;
            //fun.PolyFill(dxf, Arc5, 0.15, contour);
            //Vector2[] Line73 = { v70, v68 };
            //fun.drawBLine(dxf, Line73, 0.15, contour);
            //LwPolyline Arc6 = new LwPolyline();
            //Arc6.Vertexes.Add(new LwPolylineVertex(v66));
            //Arc6.Vertexes.Add(new LwPolylineVertex(v71));
            //Arc6.Vertexes[0].Bulge = -h / 80;
            //fun.PolyFill(dxf, Arc6, 0.08, skdimensioning);
            //Vector2[] Line74 = { v71, v66 };
            //fun.drawBLine(dxf, Line74, 0.08, skdimensioning);
            //LwPolyline Arc7 = new LwPolyline();
            //Arc7.Vertexes.Add(new LwPolylineVertex(v69));
            //Arc7.Vertexes.Add(new LwPolylineVertex(v70));
            //Arc7.Vertexes[0].Bulge = -h / 200;
            //fun.PolyFill(dxf, Arc7, 0.15, contour);
            //Vector2[] Line75 = { v73, v72 };
            //fun.drawBLine(dxf, Line75, 0.15, contour);
            //Vector2[] Line76 = { v73, v74 };
            //fun.drawBLine(dxf, Line76, 0.15, contour);
            //Vector2[] Line77 = { v75, v76 };
            //fun.drawBLine(dxf, Line77, 0.15, contour);
            //Vector2[] Line78 = { v75, v53 };
            //fun.drawBLine(dxf, Line78, 0.15, contour);
            //Vector2[] Line79 = { v76, v77 };
            //fun.drawBLine(dxf, Line79, 0.15, contour);
            //LwPolyline Arc8 = new LwPolyline();
            //Arc8.Vertexes.Add(new LwPolylineVertex(v76));
            //Arc8.Vertexes.Add(new LwPolylineVertex(v78));
            //Arc8.Vertexes[0].Bulge = h / 160;
            //fun.PolyFill(dxf, Arc8, 0.15, contour);
            //Vector2[] Line80 = { v78, v79 };
            //fun.drawBLine(dxf, Line80, 0.15, contour);
            //Vector2[] Line81 = { v78, v80 };
            //fun.drawBLine(dxf, Line81, 0.15, contour);
            ////
            //Vector2[] Line82 = { v70, v80 };
            //fun.drawBLine(dxf, Line82, 0.15, contour);
            //Vector2[] Line83 = { v42, v81 };
            //fun.drawBLine(dxf, Line83, 0.15, contour);
            //LwPolyline Arc9 = new LwPolyline();
            //Arc9.Vertexes.Add(new LwPolylineVertex(v81));
            //Arc9.Vertexes.Add(new LwPolylineVertex(v82));
            //Arc9.Vertexes[0].Bulge = -h / 160;
            //fun.PolyFill(dxf, Arc9, 0.15, contour);
            //Vector2[] Line84 = { v83, v82 };
            //fun.drawBLine(dxf, Line84, 0.15, contour);
            //Vector2[] Line85 = { v84, v81 };
            //fun.drawBLine(dxf, Line85, 0.15, contour);
            //LwPolyline Arc10 = new LwPolyline();
            //Arc10.Vertexes.Add(new LwPolylineVertex(v74));
            //Arc10.Vertexes.Add(new LwPolylineVertex(v84));
            //Arc10.Vertexes[0].Bulge = h / 100;
            //fun.PolyFill(dxf, Arc10, 0.15, contour);
            //Vector2[] Line86 = { v85, v82 };
            //fun.drawBLine(dxf, Line86, 0.15, contour);
            //LwPolyline Arc11 = new LwPolyline();
            //Arc11.Vertexes.Add(new LwPolylineVertex(v85));
            //Arc11.Vertexes.Add(new LwPolylineVertex(v84));
            //Arc11.Vertexes[0].Bulge = h / 120;
            //fun.PolyFill(dxf, Arc11, 0.15, contour);
            //Vector2[] Line87 = { v86, v67 };
            //fun.drawBLine(dxf, Line87, 0.15, contour);
            //Vector2[] Line88 = { v86, v87 };
            //fun.drawBLine(dxf, Line88, 0.15, contour);
            //Vector2[] Line89 = { v86, v88 };
            //fun.drawBLine(dxf, Line89, 0.15, contour);
            //Vector2[] Line90 = { v89, v88 };
            //fun.drawBLine(dxf, Line90, 0.15, contour);
            //Vector2[] Line91 = { v89, v90 };
            //fun.drawBLine(dxf, Line91, 0.15, contour);
            //Vector2[] Line92 = { v91, v90 };
            //fun.drawBLine(dxf, Line92, 0.15, contour);
            //Vector2[] Line93 = { v92, v90 };
            //fun.drawBLine(dxf, Line93, 0.15, contour);
            //Vector2[] Line94 = { v93, v89 };
            //fun.drawBLine(dxf, Line94, 0.15, contour);
            //LwPolyline Arc12 = new LwPolyline();
            //Arc12.Vertexes.Add(new LwPolylineVertex(v90));
            //Arc12.Vertexes.Add(new LwPolylineVertex(v94));
            //Arc12.Vertexes[0].Bulge = h / 80;
            //fun.PolyFill(dxf, Arc12, 0.15, contour);
            //Vector2[] Line95 = { v90, v95 };
            //fun.drawPlinetype(dxf, Line95, refin, Linetype.Dashed);
            //LwPolyline Arc13 = new LwPolyline();
            //Arc13.Vertexes.Add(new LwPolylineVertex(v85));
            //Arc13.Vertexes.Add(new LwPolylineVertex(v96));
            //Arc13.Vertexes[0].Bulge = h / 180;
            //fun.PolyFill(dxf, Arc13, 0.15, contour);
            //LwPolyline Arc14 = new LwPolyline();
            //Arc14.Vertexes.Add(new LwPolylineVertex(v88));
            //Arc14.Vertexes.Add(new LwPolylineVertex(v97));
            //Arc14.Vertexes[0].Bulge = h / 160;
            //fun.PolyFill(dxf, Arc14, 0.15, contour);
            //Vector2[] Line96 = { v96, v80 };
            //fun.drawBLine(dxf, Line96, 0.15, contour);
            //Vector2[] Line97 = { v98, v90 };
            //fun.drawBLine(dxf, Line97, 0.15, contour);
            //LwPolyline Arc15 = new LwPolyline();
            //Arc15.Vertexes.Add(new LwPolylineVertex(v96));
            //Arc15.Vertexes.Add(new LwPolylineVertex(v99));
            //Arc15.Vertexes[0].Bulge = h / 260;
            //fun.PolyFill(dxf, Arc15, 0.15, contour);
            //Vector2[] Line98 = { v100, v99 };
            //fun.drawBLine(dxf, Line98, 0.15, contour);
            //Vector2[] Line99 = { v101, v79 };
            //fun.drawBLine(dxf, Line99, 0.07, contour);
            //LwPolyline Arc16 = new LwPolyline();
            //Arc16.Vertexes.Add(new LwPolylineVertex(v79));
            //Arc16.Vertexes.Add(new LwPolylineVertex(v102));
            //Arc16.Vertexes[0].Bulge = -h / 260;
            //fun.PolyFill(dxf, Arc16, 0.15, contour);
            //LwPolyline Arc17 = new LwPolyline();
            //Arc17.Vertexes.Add(new LwPolylineVertex(v103));
            //Arc17.Vertexes.Add(new LwPolylineVertex(v102));
            //Arc17.Vertexes[0].Bulge = -h / 44;
            //fun.PolyFill(dxf, Arc17, 0.15, contour);
            //Vector2[] Line100 = { v103, v104 };
            //fun.drawBLine(dxf, Line100, 0.15, contour);
            //LwPolyline Arc18 = new LwPolyline();
            //Arc18.Vertexes.Add(new LwPolylineVertex(v104));
            //Arc18.Vertexes.Add(new LwPolylineVertex(v105));
            //Arc18.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc18, 0.15, contour);
            //Vector2[] Line101 = { v103, v106 };
            //fun.drawBLine(dxf, Line101, 0.15, contour);
            //Vector2[] Line102 = { v102, v107 };
            //fun.drawBLine(dxf, Line102, 0.15, contour);
            //Vector2[] Line103 = { v101, v108 };
            //fun.drawBLine(dxf, Line103, 0.15, contour);
            //Vector2[] Line104 = { v109, v108 };
            //fun.drawBLine(dxf, Line104, 0.15, contour);
            //Vector2[] Line105 = { v109, v110 };
            //fun.drawBLine(dxf, Line105, 0.15, contour);
            //Vector2[] Line106 = { v111, v112 };
            //fun.drawBLine(dxf, Line106, 0.2, contour);
            //Vector2[] Line107 = { v110, v113 };
            //fun.drawBLine(dxf, Line107, 0.15, contour);
            //Vector2[] Line108 = { v101, v113 };
            //fun.drawBLine(dxf, Line108, 0.15, contour);
            //Vector2[] Line109 = { v114, v115 };
            //fun.drawBLine(dxf, Line109, 0.15, contour);
            //Vector2[] Line110 = { v112, v115 };
            //fun.drawBLine(dxf, Line110, 0.15, contour);
            ////
            //Vector2[] Line111 = { v116, v117 };
            //fun.drawBLine(dxf, Line111, 0.15, contour);
            //Vector2[] Line112 = { v118, v117 };
            //fun.drawBLine(dxf, Line112, 0.15, contour);
            //Vector2[] Line113 = { v118, v119 };
            //fun.drawBLine(dxf, Line113, 0.15, contour);
            //Vector2[] Line114 = { v116, v119 };
            //fun.drawBLine(dxf, Line114, 0.15, contour);
            //Vector2[] Line115 = { v120, v121 };
            //fun.drawBLine(dxf, Line115, 0.08, skdimensioning);
            ////
            //LwPolyline Arc19 = new LwPolyline();
            //Arc19.Vertexes.Add(new LwPolylineVertex(v48));
            //Arc19.Vertexes.Add(new LwPolylineVertex(v122));
            //Arc19.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc19, 0.08, refin);
            //LwPolyline Arc20 = new LwPolyline();
            //Arc20.Vertexes.Add(new LwPolylineVertex(v52));
            //Arc20.Vertexes.Add(new LwPolylineVertex(v123));
            //Arc20.Vertexes[0].Bulge = h / 300;
            //fun.PolyFill(dxf, Arc20, 0.08, refin);
            //LwPolyline Arc21 = new LwPolyline();
            //Arc21.Vertexes.Add(new LwPolylineVertex(v125));
            //Arc21.Vertexes.Add(new LwPolylineVertex(v124));
            //Arc21.Vertexes[0].Bulge = -h / 320;
            //fun.PolyFill(dxf, Arc21, 0.08, refin);
            ////
            //LwPolyline Arc22 = new LwPolyline();
            //Arc22.Vertexes.Add(new LwPolylineVertex(v90));
            //Arc22.Vertexes.Add(new LwPolylineVertex(v123));
            //Arc22.Vertexes[0].Bulge = -h / 400;
            //fun.PolyFill(dxf, Arc22, 0.08, refin);
            //LwPolyline Arc23 = new LwPolyline();
            //Arc23.Vertexes.Add(new LwPolylineVertex(v125));
            //Arc23.Vertexes.Add(new LwPolylineVertex(v126));
            //Arc23.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc23, 0.08, refin);
            //LwPolyline Arc24 = new LwPolyline();
            //Arc24.Vertexes.Add(new LwPolylineVertex(v71));
            //Arc24.Vertexes.Add(new LwPolylineVertex(v122));
            //Arc24.Vertexes[0].Bulge = -h / 320;
            //fun.PolyFill(dxf, Arc24, 0.08, refin);
            //LwPolyline Arc25 = new LwPolyline();
            //Arc25.Vertexes.Add(new LwPolylineVertex(v123));
            //Arc25.Vertexes.Add(new LwPolylineVertex(v127));
            //Arc25.Vertexes[0].Bulge = -h / 360;
            //fun.PolyFill(dxf, Arc25, 0.08, refin);
            //LwPolyline Arc26 = new LwPolyline();
            //Arc26.Vertexes.Add(new LwPolylineVertex(v125));
            //Arc26.Vertexes.Add(new LwPolylineVertex(v128));
            //Arc26.Vertexes[0].Bulge = -h / 360;
            //fun.PolyFill(dxf, Arc26, 0.08, refin);
            //LwPolyline Arc27 = new LwPolyline();
            //Arc27.Vertexes.Add(new LwPolylineVertex(v122));
            //Arc27.Vertexes.Add(new LwPolylineVertex(v129));
            //Arc27.Vertexes[0].Bulge = -h / 360;
            //fun.PolyFill(dxf, Arc27, 0.08, refin);
            ////
            //LwPolyline Arc28 = new LwPolyline();
            //Arc28.Vertexes.Add(new LwPolylineVertex(v123));
            //Arc28.Vertexes.Add(new LwPolylineVertex(v130));
            //Arc28.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc28, 0.08, refin);
            //LwPolyline Arc29 = new LwPolyline();
            //Arc29.Vertexes.Add(new LwPolylineVertex(v125));
            //Arc29.Vertexes.Add(new LwPolylineVertex(v131));
            //Arc29.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc29, 0.08, refin);
            //LwPolyline Arc30 = new LwPolyline();
            //Arc30.Vertexes.Add(new LwPolylineVertex(v122));
            //Arc30.Vertexes.Add(new LwPolylineVertex(v132));
            //Arc30.Vertexes[0].Bulge = h / 400;
            //fun.PolyFill(dxf, Arc30, 0.08, refin);
            //Vector2[] Line116 = { v130, v133 };
            //fun.drawPlinetype(dxf, Line116, refin, Linetype.Dashed);
            //Vector2[] Line117 = { v131, v134 };
            //fun.drawPlinetype(dxf, Line117, refin, Linetype.Dashed);
            //Vector2[] Line118 = { v132, v135 };
            //fun.drawPlinetype(dxf, Line118, refin, Linetype.Dashed);
            ////
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v1.X - h / 6, v1.Y), new Vector2(v1.X + l1, v1.Y) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v27.X - h / 1.6, v27.Y + h / 22), new Vector2(v19.X + h + h / 6.8, v19.Y - h / 26) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v28.X - h / 1.6, v28.Y - h / 22), new Vector2(v18.X + h + h / 6.8, v18.Y + h / 26) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v49.X, v49.Y - h / 16), new Vector2(v49.X, v49.Y + h + h / 3.8) }, centre, Linetype.Center);
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 1;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 0.8;
            double offset = 6;
            LinearDimension dim1 = new LinearDimension(new Line(v6, v7), offset * 3, 90, dimensionStyle);
            dim1.UserText = "Φ25 ";
            dxf.AddEntity(dim1);
            LinearDimension dim2 = new LinearDimension(new Line(v32, v33), offset * 14, 90, dimensionStyle);
            dim2.UserText = "Φ32 ";
            dxf.AddEntity(dim2);
            //LinearDimension dim3 = new LinearDimension(new Line(v112, v113), offset * 3, 270, dimensionStyle);
            //dim3.UserText = "Φ21 ";
            //dxf.AddEntity(dim3);
            //LinearDimension dim4 = new LinearDimension(new Line(v70, v113), offset * 3, 360, dimensionStyle);
            //dim4.UserText = "105 ";
            //dxf.AddEntity(dim4);
            //LinearDimension dim5 = new LinearDimension(new Line(v32, v113), offset * 5, 360, dimensionStyle);
            //dim5.UserText = "125 ";
            //dxf.AddEntity(dim5);
            LinearDimension dim6 = new LinearDimension(new Line(v7, v32), offset * 8, 360, dimensionStyle);
            dim6.UserText = "56 ";
            dxf.AddEntity(dim6);
            //
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint48(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 25;
            double pi = Math.PI;
            double epsr = 140 * pi / 180;
            double h1 = 32;
            double h3 = 21;
            double l1 = 56;
            double l2 = 125;
            double l3 = 105;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h / 4);
            Vector2 v3 = new Vector2(v1.X, v1.Y - h / 4);
            //
            Vector2 v4 = new Vector2(v2.X, v2.Y + h / 4);
            Vector2 v5 = new Vector2(v3.X, v3.Y - h / 4);
            //
            Vector2 v6 = new Vector2(v4.X + h / 10, v4.Y + h / 8);
            Vector2 v7 = new Vector2(v5.X + h / 10, v5.Y - h / 8);
            //
            Vector2 v8 = new Vector2(v6.X, v6.Y - h / 3);
            Vector2 v9 = new Vector2(v1.X, v8.Y - h / 10);
            //
            Vector2 v10 = new Vector2(v7.X, v7.Y + h / 3);
            Vector2 v11 = new Vector2(v1.X, v10.Y + h / 10);
            //
            Vector2 v12 = new Vector2(v6.X + l1 - h / 10, v6.Y);
            Vector2 v13 = new Vector2(v7.X + l1 - h / 10, v7.Y);
            //
            Vector2 v14 = new Vector2(v8.X + l1 - h / 2.6, v8.Y);
            Vector2 v15 = new Vector2(v10.X + l1 - h / 2.6, v10.Y);
            //
            Vector2 v16 = new Vector2(v8.X + h / 16, v8.Y);
            Vector2 v17 = new Vector2(v10.X + h / 16, v10.Y);
            Vector2 v18 = new Vector2(v17.X + (l1 - h / 2.6) / 2, v17.Y);
            Vector2 v19 = new Vector2(v16.X + (l1 - h / 2.6) / 2, v16.Y);
            Vector2 v20 = new Vector2(v18.X + h / 10, v1.Y);
            Vector2 v21 = new Vector2(v19.X + h / 10, v1.Y);
            //
            Vector2 v22 = new Vector2(v14.X + h / 22, v14.Y - h / 18);
            Vector2 v23 = new Vector2(v15.X + h / 22, v15.Y + h / 18);
            //
            Vector2 v24 = new Vector2(v14.X + (l1 - h / 10) - (l1 - h / 2.6) + h / 16, v14.Y);
            Vector2 v25 = new Vector2(v15.X + (l1 - h / 10) - (l1 - h / 2.6) + h / 16, v15.Y);
            Vector2 v26 = new Vector2(v24.X, v24.Y - h / 12);
            Vector2 v27 = new Vector2(v19.X + h / 30, v19.Y - h / 12);
            //
            Vector2 v28 = new Vector2(v18.X + h / 30, v18.Y + h / 12);
            Vector2 v29 = new Vector2(v25.X, v25.Y + h / 12);
            //
            Vector2 v30 = new Vector2(v1.X, v16.Y + h / 8);
            Vector2 v31 = new Vector2(v1.X, v17.Y - h / 8);
            //第二阶段
            Vector2 v32 = new Vector2(v12.X, v12.Y + (h1 - h));
            Vector2 v33 = new Vector2(v13.X, v13.Y - (h1 - h));
            //圆弧里得斜坡(上）
            Vector2 v34 = new Vector2(v19.X + h + h / 6.8 + h / 30, v19.Y - h / 26);
            Vector2 v35 = new Vector2(v19.X + h + h / 6.8, v27.Y);
            //
            Vector2 v36 = new Vector2(v34.X, v34.Y + h / 16);
            //
            Vector2 v37 = new Vector2(v19.X + h + h / 6.8 + h / 30, v25.Y + h / 26);
            Vector2 v38 = new Vector2(v19.X + h + h / 6.8, v29.Y);
            //
            Vector2 v39 = new Vector2(v37.X, v33.Y - h / 26);
            //
            Vector2 v40 = new Vector2(v29.X, v23.Y + h + h / 22);
            Vector2 v41 = new Vector2(v29.X, v25.Y - h / 20);
            //
            Vector2 v42 = new Vector2(v39.X + (l2 - l3) / 2, v39.Y);
            //
            Vector2 v43 = new Vector2(v42.X, v37.Y);
            //
            Vector2 v44 = new Vector2(v41.X + ((l2 - l3) / 2) * 2.3 / 3, v41.Y);
            Vector2 v45 = new Vector2(v44.X, v25.Y);
            Vector2 v46 = new Vector2(v45.X - h / 36, v37.Y);
            Vector2 v47 = new Vector2(v45.X, v37.Y);
            Vector2 v48 = new Vector2(v42.X, v25.Y);
            //
            Vector2 v49 = new Vector2(v41.X + (((l2 - l3) / 2) * 2.3 / 3) / 2, v41.Y - h / 16);
            Vector2 v50 = new Vector2(v44.X - (((l2 - l3) / 2) * 2.3 / 3) / 2, v44.Y - h / 16);
            //
            Vector2 v51 = new Vector2(v46.X + h / 36, v46.Y + h / 26);
            Vector2 v52 = new Vector2(v42.X, v51.Y);
            //
            Vector2 v53 = new Vector2(v32.X + (l2 - l3) / 2, v32.Y);
            Vector2 v54 = new Vector2(v53.X, v12.Y - h / 3.6);
            Vector2 v55 = new Vector2(v54.X - h / 2.707, v54.Y);
            Vector2 v56 = new Vector2(v55.X, v55.Y - h / 32);
            //
            Vector2 v57 = new Vector2(v32.X + (l2 - l3) / 6, v32.Y);
            Vector2 v58 = new Vector2(v57.X, v57.Y - h / 6);
            Vector2 v59 = new Vector2(v32.X + (l2 - l3) / 2.6, v32.Y);
            Vector2 v60 = new Vector2(v59.X, v57.Y - h / 6);
            Vector2 v61 = new Vector2(v49.X, v60.Y - h / 20);
            //
            Vector2 v62 = new Vector2(v54.X - h / 12, v54.Y);
            Vector2 v63 = new Vector2(v62.X - h / 20, v62.Y - h / 10.5);
            //
            Vector2 v64 = new Vector2(v62.X + h / 8, v62.Y - h / 20);
            Vector2 v65 = new Vector2(v54.X, v54.Y - h / 36);
            //
            Vector2 v66 = new Vector2(v51.X, v51.Y + h / 2.4);
            //
            Vector2 v67 = new Vector2(v66.X, v66.Y - (h / 2.4) / 2.3);
            //
            Vector2 v68 = new Vector2(v64.X + ((l2 - l3) / 2) * 2 / 3, v64.Y);
            Vector2 v69 = new Vector2(v68.X, v68.Y + (h1 - h));
            Vector2 v70 = new Vector2(v68.X + ((l2 - l3) / 2) * 1 / 3, v68.Y);
            //
            Vector2 v71 = new Vector2(v66.X, v66.Y + h / 8.3);
            //
            Vector2 v72 = new Vector2(v66.X - h / 26, v66.Y - (h / 2.4) / 3.2);
            Vector2 v73 = new Vector2(v48.X, v48.Y + h / 24);
            //
            Vector2 v74 = new Vector2(v73.X + (((l2 - l3) / 2) * 2.3 / 3.3) / 1.8, v73.Y - (((l2 - l3) / 2) * 2.3 / 3) / 2.6);
            //上半
            Vector2 v75 = new Vector2(v53.X + h / 36, v53.Y);
            Vector2 v76 = new Vector2(v75.X + ((l2 - l3) / 2) * 2.8 / 3.2, v75.Y - ((l2 - l3) / 2) * 2.6 / 3.6);
            Vector2 v77 = new Vector2(v76.X, v76.Y - h / 7);
            Vector2 v78 = new Vector2(v76.X + h / 8, v76.Y - h / 30);
            //
            Vector2 v79 = new Vector2(v78.X + l3 / 3, v78.Y);
            Vector2 v80 = new Vector2(v78.X, v78.Y - h / 3.2);
            //
            Vector2 v81 = new Vector2(v42.X + ((l2 - l3) / 2) * 2.8 / 3.2, v42.Y + ((l2 - l3) / 2) * 2.6 / 3.6);
            Vector2 v82 = new Vector2(v81.X + h / 8, v81.Y + h / 30);
            Vector2 v83 = new Vector2(v82.X + l3 / 3, v82.Y);
            Vector2 v84 = new Vector2(v81.X, v81.Y + h / 4);
            Vector2 v85 = new Vector2(v82.X, v82.Y + h / 4.7);
            //中间
            Vector2 v86 = new Vector2(v67.X + h / 4, v67.Y - h / 4);
            Vector2 v87 = new Vector2(v86.X, v86.Y - h / 6.3);
            Vector2 v88 = new Vector2(v86.X + h / 12, v86.Y - h / 16);
            Vector2 v89 = new Vector2(v88.X + h / 20, v88.Y + h / 2.1);
            Vector2 v90 = new Vector2(v89.X - h / 36, v89.Y);
            Vector2 v91 = new Vector2(v90.X, v90.Y + h / 8);
            Vector2 v92 = new Vector2(v90.X - h / 10, v90.Y + h / 9);
            Vector2 v93 = new Vector2(v89.X + h / 36, v89.Y + h / 9);
            //
            Vector2 v94 = new Vector2(v90.X - h / 5, v90.Y - h / 3.1);
            Vector2 v95 = new Vector2(v90.X - h / 3, v90.Y);
            //下边
            Vector2 v96 = new Vector2(v85.X + l3 * 2 / 3, v85.Y - h / 36);
            Vector2 v97 = new Vector2(v88.X + l3 * 2 / 2.9, v85.Y);
            //
            Vector2 v98 = new Vector2(v90.X + l3 / 4.6, v90.Y - h / 10);
            //
            Vector2 v99 = new Vector2(v96.X + l3 / 3 - l3 / 8, v96.Y - h / 6);
            Vector2 v100 = new Vector2(v99.X + l3 / 8, v99.Y);
            //
            Vector2 v101 = new Vector2(v79.X + l3 * 2 / 3, v79.Y + h / 80);
            Vector2 v102 = new Vector2(v101.X - l2 / 9, v1.Y + h / 6);
            Vector2 v103 = new Vector2(v102.X + h / 6, v102.Y + h / 8);
            Vector2 v104 = new Vector2(v103.X - h / 26, v101.Y);
            Vector2 v105 = new Vector2(v101.X - l2 / 3.2, v1.Y + h / 2.15);
            Vector2 v106 = new Vector2(v103.X - h / 1.9, v103.Y);
            Vector2 v107 = new Vector2(v102.X, v102.Y + h / 8);
            //
            Vector2 v108 = new Vector2(v101.X + h / 22, v101.Y - h / 3.2);
            Vector2 v109 = new Vector2(v108.X - h / 3, v108.Y - h / 30);
            Vector2 v110 = new Vector2(v109.X - h / 24, v101.Y);
            //下底右边
            Vector2 v111 = new Vector2(v108.X - h / 23, v108.Y - h / 200);
            Vector2 v112 = new Vector2(v111.X, v111.Y - h3 - h / 28);
            //上侧斜边
            Vector2 v113 = new Vector2(v110.X + h / 3.07, v110.Y + h / 40);
            //
            Vector2 v114 = new Vector2(v111.X - (h / 23) * 1.3, v111.Y - (h / 200) * 1.3);
            Vector2 v115 = new Vector2(v114.X, v114.Y - h3 / 1.2);
            //
            Vector2 v116 = new Vector2(v101.X + h / 40, v115.Y + h / 5.6);
            Vector2 v117 = new Vector2(v108.X - h / 3.1, v116.Y - h / 30);
            Vector2 v118 = new Vector2(v109.X - h / 40, v117.Y + h / 3.5);
            Vector2 v119 = new Vector2(v110.X + h / 3.1, v118.Y + h / 40);
            //虚线段
            Vector2 v120 = new Vector2(v1.X + l1, v1.Y);
            Vector2 v121 = new Vector2(v120.X + l2 + h / 3, v120.Y);
            //*/
            Vector2 v122 = new Vector2(v120.X + l2 / 1.2, v120.Y);
            Vector2 v123 = new Vector2(v120.X + l2 / 1.6, v120.Y);
            Vector2 v124 = new Vector2(v52.X, v37.Y);
            Vector2 v125 = new Vector2(v120.X + l2 / 1.4, v120.Y);
            //
            Vector2 v126 = new Vector2(v89.X - h / 36, v89.Y + h / 20);
            Vector2 v127 = new Vector2(v123.X + h * 1.59, v123.Y + h / 3.7);
            //
            Vector2 v128 = new Vector2(v127.X + h / 9, v123.Y + h / 4);
            Vector2 v129 = new Vector2(v128.X + h / 3.5, v128.Y - h / 10);
            //
            Vector2 v130 = new Vector2(v123.X + h * 1.3, v1.Y - h / 5);
            Vector2 v131 = new Vector2(v123.X + h * 1.3, v1.Y - h / 7);
            Vector2 v132 = new Vector2(v123.X + h * 1.3, v1.Y - h / 20);
            //
            Vector2 v133 = new Vector2(v130.X + h / 1.44, v130.Y + h / 16);
            Vector2 v134 = new Vector2(v131.X + h / 1.46, v131.Y + h / 16);
            Vector2 v135 = new Vector2(v132.X + h / 1.46, v132.Y + h / 16);
            //线段
            //主视图
            //Vector2[] Line1 = { v1, v2 };
            //fun.drawBLine(dxf, Line1, 0.15, contour);
            //Vector2[] Line2 = { v1, v3 };
            //fun.drawBLine(dxf, Line2, 0.15, contour);
            //Vector2[] Line3 = { v2, v4 };
            //fun.drawBLine(dxf, Line3, 0.15, contour);
            //Vector2[] Line4 = { v3, v5 };
            //fun.drawBLine(dxf, Line4, 0.15, contour);
            //Vector2[] Line5 = { v4, v6 };
            //fun.drawBLine(dxf, Line5, 0.15, contour);
            //Vector2[] Line6 = { v5, v7 };
            //fun.drawBLine(dxf, Line6, 0.15, contour);
            //Vector2[] Line7 = { v6, v8 };
            //fun.drawBLine(dxf, Line7, 0.15, contour);
            ////
            //Vector2[] Line8 = { v9, v8 };
            //fun.drawBLine(dxf, Line8, 0.15, contour);
            ////
            //Vector2[] Line9 = { v7, v10 };
            //fun.drawBLine(dxf, Line9, 0.15, contour);
            //Vector2[] Line10 = { v11, v10 };
            //fun.drawBLine(dxf, Line10, 0.15, contour);
            ////
            //Vector2[] Line11 = { v12, v6 };
            //fun.drawBLine(dxf, Line11, 0.15, contour);
            //Vector2[] Line12 = { v13, v7 };
            //fun.drawBLine(dxf, Line12, 0.15, contour);
            //Vector2[] Line13 = { v13, v12 };
            //fun.drawBLine(dxf, Line13, 0.15, contour);
            ////
            //Vector2[] Line14 = { v14, v8 };
            //fun.drawBLine(dxf, Line14, 0.15, contour);
            //Vector2[] Line15 = { v14, v15 };
            //fun.drawBLine(dxf, Line15, 0.15, contour);
            //Vector2[] Line16 = { v15, v10 };
            //fun.drawBLine(dxf, Line16, 0.15, contour);
            //
            Vector2[] Line17 = { v17, v16 };
            fun.drawPlinetype(dxf, Line17,0.25, refin, Linetype.Dashed);
            Vector2[] Line18 = { v17, v18 };
            fun.drawPlinetype(dxf, Line18, 0.25, refin, Linetype.Dashed);
            Vector2[] Line19 = { v16, v19 };
            fun.drawPlinetype(dxf, Line19, 0.25, refin, Linetype.Dashed);
            Vector2[] Line20 = { v18, v19 };
            fun.drawPlinetype(dxf, Line20, 0.25, refin, Linetype.Dashed);
            Vector2[] Line21 = { v18, v20 };
            fun.drawPlinetype(dxf, Line21, 0.25, refin, Linetype.Dashed);
            Vector2[] Line22 = { v19, v21 };
            fun.drawPlinetype(dxf, Line22, 0.25, refin, Linetype.Dashed);
            //
            //Vector2[] Line23 = { v14, v22 };
            //fun.drawBLine(dxf, Line23, 0.15, contour);
            //Vector2[] Line24 = { v15, v23 };
            //fun.drawBLine(dxf, Line24, 0.15, contour);
            //Vector2[] Line25 = { v22, v23 };
            //fun.drawBLine(dxf, Line25, 0.15, contour);
            Vector2[] Line26 = { v14, v24 };
            fun.drawPlinetype(dxf, Line26, 0.25, refin, Linetype.Dashed);
            Vector2[] Line27 = { v15, v25 };
            fun.drawPlinetype(dxf, Line27, 0.25, refin, Linetype.Dashed);
            Vector2[] Line28 = { v26, v27 };
            fun.drawPlinetype(dxf, Line28, 0.25, refin, Linetype.Dashed);
            Vector2[] Line29 = { v28, v29 };
            fun.drawPlinetype(dxf, Line29, 0.25, refin, Linetype.Dashed);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v24));
            Arc1.Vertexes.Add(new LwPolylineVertex(v26));
            Arc1.Vertexes[0].Bulge = -h / 36;
            fun.PolyFill(dxf, Arc1, 0.08, refin);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v25));
            Arc2.Vertexes.Add(new LwPolylineVertex(v29));
            Arc2.Vertexes[0].Bulge = h / 36;
            fun.PolyFill(dxf, Arc2, 0.35, refin);
            Vector2[] Line30 = { v16, v30 };
            fun.drawBLine(dxf, Line30, 0.35, refin);
            Vector2[] Line31 = { v17, v31 };
            fun.drawBLine(dxf, Line31, 0.35, refin);
            //
            //Vector2[] Line32 = { v32, v12 };
            //fun.drawBLine(dxf, Line32, 0.15, contour);
            //Vector2[] Line33 = { v33, v13 };
            //fun.drawBLine(dxf, Line33, 0.15, contour);
            //Vector2[] Line34 = { v34, v35 };
            //fun.drawBLine(dxf, Line34, 0.15, contour);
            //Vector2[] Line35 = { v34, v36 };
            //fun.drawBLine(dxf, Line35, 0.15, contour);
            //Vector2[] Line36 = { v37, v38 };
            //fun.drawBLine(dxf, Line36, 0.15, contour);
            //Vector2[] Line37 = { v39, v37 };
            //fun.drawBLine(dxf, Line37, 0.15, contour);
            //Vector2[] Line38 = { v39, v33 };
            //fun.drawBLine(dxf, Line38, 0.15, contour);
            Vector2[] Line39 = { v26, v29 };
            fun.drawPlinetype(dxf, Line39, 0.25, refin, Linetype.Dashed);
            Vector2[] Line40 = { v24, v40 };
            fun.drawPlinetype(dxf, Line40, 0.25, refin, Linetype.Dashed);
            Vector2[] Line41 = { v32, v40 };
            fun.drawPlinetype(dxf, Line41, 0.25, refin, Linetype.Dashed);
            Vector2[] Line42 = { v25, v41 };
            fun.drawBLine(dxf, Line42, 0.25, skdimensioning);
            //Vector2[] Line43 = { v42, v39 };
            //fun.drawBLine(dxf, Line43, 0.15, contour);
            //Vector2[] Line44 = { v42, v43 };
            //fun.drawBLine(dxf, Line44, 0.15, contour);
            //Vector2[] Line45 = { v37, v43 };
            //fun.drawBLine(dxf, Line45, 0.15, contour);
            Vector2[] Line46 = { v41, v44 };
            fun.drawBLine(dxf, Line46, 0.25, skdimensioning);
            Vector2[] Line47 = { v45, v44 };
            fun.drawBLine(dxf, Line47, 0.25, skdimensioning);
            Vector2[] Line48 = { v45, v46 };
            fun.drawBLine(dxf, Line48, 0.25, skdimensioning);
            Vector2[] Line49 = { v45, v47 };
            fun.drawBLine(dxf, Line49, 0.25, skdimensioning);
            Vector2[] Line50 = { v48, v45 };
            fun.drawBLine(dxf, Line50, 0.25, skdimensioning);
            Vector2[] Line51 = { v49, v41 };
            fun.drawBLine(dxf, Line51, 0.25, skdimensioning);
            Vector2[] Line52 = { v50, v44 };
            fun.drawBLine(dxf, Line52, 0.25, skdimensioning);
            Vector2[] Line53 = { v51, v46 };
            fun.drawBLine(dxf, Line53, 0.25, skdimensioning);
            Vector2[] Line54 = { v51, v47 };
            fun.drawBLine(dxf, Line54, 0.25, skdimensioning);
            Vector2[] Line55 = { v51, v52 };
            fun.drawBLine(dxf, Line55, 0.25, skdimensioning);
            Vector2[] Line56 = { v48, v52 };
            fun.drawBLine(dxf, Line56, 0.25, skdimensioning);
            //Vector2[] Line57 = { v32, v53 };
            //fun.drawBLine(dxf, Line57, 0.15, contour);
            Vector2[] Line58 = { v54, v53 };
            fun.drawBLine(dxf, Line58, 0.5, contour);
            Vector2[] Line59 = { v54, v55 };
            fun.drawBLine(dxf, Line59, 0.5, contour);
            //Vector2[] Line60 = { v56, v55 };
            //fun.drawBLine(dxf, Line60, 0.15, contour);
            Vector2[] Line61 = { v57, v58 };
            fun.drawPlinetype(dxf, Line61, 0.25, refin, Linetype.Dashed);
            Vector2[] Line62 = { v59, v60 };
            fun.drawPlinetype(dxf, Line62, 0.25, refin, Linetype.Dashed);
            Vector2[] Line63 = { v58, v60 };
            fun.drawPlinetype(dxf, Line63, 0.25, refin, Linetype.Dashed);
            Vector2[] Line64 = { v61, v60 };
            fun.drawPlinetype(dxf, Line64, 0.25, refin, Linetype.Dashed);
            Vector2[] Line65 = { v61, v58 };
            fun.drawPlinetype(dxf, Line65, 0.25, refin, Linetype.Dashed);
            //LwPolyline Arc3 = new LwPolyline();
            //Arc3.Vertexes.Add(new LwPolylineVertex(v53));
            //Arc3.Vertexes.Add(new LwPolylineVertex(v62));
            //Arc3.Vertexes[0].Bulge = h / 200;
            //fun.PolyFill(dxf, Arc3, 0.15, contour);
            //Vector2[] Line66 = { v63, v62 };
            //fun.drawBLine(dxf, Line66, 0.15, contour);
            //Vector2[] Line67 = { v34, v63 };
            //fun.drawBLine(dxf, Line67, 0.15, contour);
            //Vector2[] Line68 = { v64, v62 };
            //fun.drawBLine(dxf, Line68, 0.15, contour);
            //Vector2[] Line69 = { v65, v54 };
            //fun.drawBLine(dxf, Line69, 0.15, contour);
            Vector2[] Line70 = { v66, v51 };
            fun.drawBLine(dxf, Line70, 0.25, skdimensioning);
            //
            //LwPolyline Arc4 = new LwPolyline();
            //Arc4.Vertexes.Add(new LwPolylineVertex(v63));
            //Arc4.Vertexes.Add(new LwPolylineVertex(v67));
            //Arc4.Vertexes[0].Bulge = h / 200;
            //fun.PolyFill(dxf, Arc4, 0.15, contour);
            //Vector2[] Line71 = { v64, v68 };
            //fun.drawBLine(dxf, Line71, 0.15, contour);
            //Vector2[] Line72 = { v69, v68 };
            //fun.drawBLine(dxf, Line72, 0.15, contour);
            //LwPolyline Arc5 = new LwPolyline();
            //Arc5.Vertexes.Add(new LwPolylineVertex(v53));
            //Arc5.Vertexes.Add(new LwPolylineVertex(v69));
            //Arc5.Vertexes[0].Bulge = -h / 180;
            //fun.PolyFill(dxf, Arc5, 0.15, contour);
            //Vector2[] Line73 = { v70, v68 };
            //fun.drawBLine(dxf, Line73, 0.15, contour);
            LwPolyline Arc6 = new LwPolyline();
            Arc6.Vertexes.Add(new LwPolylineVertex(v66));
            Arc6.Vertexes.Add(new LwPolylineVertex(v71));
            Arc6.Vertexes[0].Bulge = -h / 80;
            fun.PolyFill(dxf, Arc6, 0.25, skdimensioning);
            Vector2[] Line74 = { v71, v66 };
            fun.drawBLine(dxf, Line74, 0.25, skdimensioning);
            //LwPolyline Arc7 = new LwPolyline();
            //Arc7.Vertexes.Add(new LwPolylineVertex(v69));
            //Arc7.Vertexes.Add(new LwPolylineVertex(v70));
            //Arc7.Vertexes[0].Bulge = -h / 200;
            //fun.PolyFill(dxf, Arc7, 0.15, contour);
            //Vector2[] Line75 = { v73, v72 };
            //fun.drawBLine(dxf, Line75, 0.15, contour);
            //Vector2[] Line76 = { v73, v74 };
            //fun.drawBLine(dxf, Line76, 0.15, contour);
            //Vector2[] Line77 = { v75, v76 };
            //fun.drawBLine(dxf, Line77, 0.15, contour);
            //Vector2[] Line78 = { v75, v53 };
            //fun.drawBLine(dxf, Line78, 0.15, contour);
            //Vector2[] Line79 = { v76, v77 };
            //fun.drawBLine(dxf, Line79, 0.15, contour);
            //LwPolyline Arc8 = new LwPolyline();
            //Arc8.Vertexes.Add(new LwPolylineVertex(v76));
            //Arc8.Vertexes.Add(new LwPolylineVertex(v78));
            //Arc8.Vertexes[0].Bulge = h / 160;
            //fun.PolyFill(dxf, Arc8, 0.15, contour);
            //Vector2[] Line80 = { v78, v79 };
            //fun.drawBLine(dxf, Line80, 0.15, contour);
            //Vector2[] Line81 = { v78, v80 };
            //fun.drawBLine(dxf, Line81, 0.15, contour);
            ////
            //Vector2[] Line82 = { v70, v80 };
            //fun.drawBLine(dxf, Line82, 0.15, contour);
            //Vector2[] Line83 = { v42, v81 };
            //fun.drawBLine(dxf, Line83, 0.15, contour);
            //LwPolyline Arc9 = new LwPolyline();
            //Arc9.Vertexes.Add(new LwPolylineVertex(v81));
            //Arc9.Vertexes.Add(new LwPolylineVertex(v82));
            //Arc9.Vertexes[0].Bulge = -h / 160;
            //fun.PolyFill(dxf, Arc9, 0.15, contour);
            //Vector2[] Line84 = { v83, v82 };
            //fun.drawBLine(dxf, Line84, 0.15, contour);
            //Vector2[] Line85 = { v84, v81 };
            //fun.drawBLine(dxf, Line85, 0.15, contour);
            //LwPolyline Arc10 = new LwPolyline();
            //Arc10.Vertexes.Add(new LwPolylineVertex(v74));
            //Arc10.Vertexes.Add(new LwPolylineVertex(v84));
            //Arc10.Vertexes[0].Bulge = h / 100;
            //fun.PolyFill(dxf, Arc10, 0.15, contour);
            //Vector2[] Line86 = { v85, v82 };
            //fun.drawBLine(dxf, Line86, 0.15, contour);
            //LwPolyline Arc11 = new LwPolyline();
            //Arc11.Vertexes.Add(new LwPolylineVertex(v85));
            //Arc11.Vertexes.Add(new LwPolylineVertex(v84));
            //Arc11.Vertexes[0].Bulge = h / 120;
            //fun.PolyFill(dxf, Arc11, 0.15, contour);
            //Vector2[] Line87 = { v86, v67 };
            //fun.drawBLine(dxf, Line87, 0.15, contour);
            //Vector2[] Line88 = { v86, v87 };
            //fun.drawBLine(dxf, Line88, 0.15, contour);
            //Vector2[] Line89 = { v86, v88 };
            //fun.drawBLine(dxf, Line89, 0.15, contour);
            //Vector2[] Line90 = { v89, v88 };
            //fun.drawBLine(dxf, Line90, 0.15, contour);
            //Vector2[] Line91 = { v89, v90 };
            //fun.drawBLine(dxf, Line91, 0.15, contour);
            //Vector2[] Line92 = { v91, v90 };
            //fun.drawBLine(dxf, Line92, 0.15, contour);
            //Vector2[] Line93 = { v92, v90 };
            //fun.drawBLine(dxf, Line93, 0.15, contour);
            //Vector2[] Line94 = { v93, v89 };
            //fun.drawBLine(dxf, Line94, 0.15, contour);
            //LwPolyline Arc12 = new LwPolyline();
            //Arc12.Vertexes.Add(new LwPolylineVertex(v90));
            //Arc12.Vertexes.Add(new LwPolylineVertex(v94));
            //Arc12.Vertexes[0].Bulge = h / 80;
            //fun.PolyFill(dxf, Arc12, 0.15, contour);
            Vector2[] Line95 = { v90, v95 };
            fun.drawPlinetype(dxf, Line95, 0.25, refin, Linetype.Dashed);
            //LwPolyline Arc13 = new LwPolyline();
            //Arc13.Vertexes.Add(new LwPolylineVertex(v85));
            //Arc13.Vertexes.Add(new LwPolylineVertex(v96));
            //Arc13.Vertexes[0].Bulge = h / 180;
            //fun.PolyFill(dxf, Arc13, 0.15, contour);
            //LwPolyline Arc14 = new LwPolyline();
            //Arc14.Vertexes.Add(new LwPolylineVertex(v88));
            //Arc14.Vertexes.Add(new LwPolylineVertex(v97));
            //Arc14.Vertexes[0].Bulge = h / 160;
            //fun.PolyFill(dxf, Arc14, 0.15, contour);
            //Vector2[] Line96 = { v96, v80 };
            //fun.drawBLine(dxf, Line96, 0.15, contour);
            //Vector2[] Line97 = { v98, v90 };
            //fun.drawBLine(dxf, Line97, 0.15, contour);
            //LwPolyline Arc15 = new LwPolyline();
            //Arc15.Vertexes.Add(new LwPolylineVertex(v96));
            //Arc15.Vertexes.Add(new LwPolylineVertex(v99));
            //Arc15.Vertexes[0].Bulge = h / 260;
            //fun.PolyFill(dxf, Arc15, 0.15, contour);
            //Vector2[] Line98 = { v100, v99 };
            //fun.drawBLine(dxf, Line98, 0.15, contour);
            //Vector2[] Line99 = { v101, v79 };
            //fun.drawBLine(dxf, Line99, 0.07, contour);
            //LwPolyline Arc16 = new LwPolyline();
            //Arc16.Vertexes.Add(new LwPolylineVertex(v79));
            //Arc16.Vertexes.Add(new LwPolylineVertex(v102));
            //Arc16.Vertexes[0].Bulge = -h / 260;
            //fun.PolyFill(dxf, Arc16, 0.15, contour);
            //LwPolyline Arc17 = new LwPolyline();
            //Arc17.Vertexes.Add(new LwPolylineVertex(v103));
            //Arc17.Vertexes.Add(new LwPolylineVertex(v102));
            //Arc17.Vertexes[0].Bulge = -h / 44;
            //fun.PolyFill(dxf, Arc17, 0.15, contour);
            //Vector2[] Line100 = { v103, v104 };
            //fun.drawBLine(dxf, Line100, 0.15, contour);
            //LwPolyline Arc18 = new LwPolyline();
            //Arc18.Vertexes.Add(new LwPolylineVertex(v104));
            //Arc18.Vertexes.Add(new LwPolylineVertex(v105));
            //Arc18.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc18, 0.15, contour);
            //Vector2[] Line101 = { v103, v106 };
            //fun.drawBLine(dxf, Line101, 0.15, contour);
            //Vector2[] Line102 = { v102, v107 };
            //fun.drawBLine(dxf, Line102, 0.15, contour);
            //Vector2[] Line103 = { v101, v108 };
            //fun.drawBLine(dxf, Line103, 0.15, contour);
            //Vector2[] Line104 = { v109, v108 };
            //fun.drawBLine(dxf, Line104, 0.15, contour);
            //Vector2[] Line105 = { v109, v110 };
            //fun.drawBLine(dxf, Line105, 0.15, contour);
            //Vector2[] Line106 = { v111, v112 };
            //fun.drawBLine(dxf, Line106, 0.2, contour);
            //Vector2[] Line107 = { v110, v113 };
            //fun.drawBLine(dxf, Line107, 0.15, contour);
            //Vector2[] Line108 = { v101, v113 };
            //fun.drawBLine(dxf, Line108, 0.15, contour);
            //Vector2[] Line109 = { v114, v115 };
            //fun.drawBLine(dxf, Line109, 0.15, contour);
            //Vector2[] Line110 = { v112, v115 };
            //fun.drawBLine(dxf, Line110, 0.15, contour);
            ////
            //Vector2[] Line111 = { v116, v117 };
            //fun.drawBLine(dxf, Line111, 0.15, contour);
            //Vector2[] Line112 = { v118, v117 };
            //fun.drawBLine(dxf, Line112, 0.15, contour);
            //Vector2[] Line113 = { v118, v119 };
            //fun.drawBLine(dxf, Line113, 0.15, contour);
            //Vector2[] Line114 = { v116, v119 };
            //fun.drawBLine(dxf, Line114, 0.15, contour);
            //Vector2[] Line115 = { v120, v121 };
            //fun.drawBLine(dxf, Line115, 0.08, skdimensioning);
            //
            LwPolyline Arc19 = new LwPolyline();
            Arc19.Vertexes.Add(new LwPolylineVertex(v48));
            Arc19.Vertexes.Add(new LwPolylineVertex(v122));
            Arc19.Vertexes[0].Bulge = h / 360;
            fun.PolyFill(dxf, Arc19, 0.35, refin);
            LwPolyline Arc20 = new LwPolyline();
            Arc20.Vertexes.Add(new LwPolylineVertex(v52));
            Arc20.Vertexes.Add(new LwPolylineVertex(v123));
            Arc20.Vertexes[0].Bulge = h / 300;
            fun.PolyFill(dxf, Arc20, 0.35, refin);
            //LwPolyline Arc21 = new LwPolyline();
            //Arc21.Vertexes.Add(new LwPolylineVertex(v125));
            //Arc21.Vertexes.Add(new LwPolylineVertex(v124));
            //Arc21.Vertexes[0].Bulge = -h / 320;
            //fun.PolyFill(dxf, Arc21, 0.08, refin);
            //
            LwPolyline Arc22 = new LwPolyline();
            Arc22.Vertexes.Add(new LwPolylineVertex(v90));
            Arc22.Vertexes.Add(new LwPolylineVertex(v123));
            Arc22.Vertexes[0].Bulge = -h / 400;
            fun.PolyFill(dxf, Arc22, 0.35, refin);
            //LwPolyline Arc23 = new LwPolyline();
            //Arc23.Vertexes.Add(new LwPolylineVertex(v125));
            //Arc23.Vertexes.Add(new LwPolylineVertex(v126));
            //Arc23.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc23, 0.08, refin);
            LwPolyline Arc24 = new LwPolyline();
            Arc24.Vertexes.Add(new LwPolylineVertex(v71));
            Arc24.Vertexes.Add(new LwPolylineVertex(v122));
            Arc24.Vertexes[0].Bulge = -h / 320;
            fun.PolyFill(dxf, Arc24, 0.35, refin);
            LwPolyline Arc25 = new LwPolyline();
            Arc25.Vertexes.Add(new LwPolylineVertex(v123));
            Arc25.Vertexes.Add(new LwPolylineVertex(v127));
            Arc25.Vertexes[0].Bulge = -h / 360;
            fun.PolyFill(dxf, Arc25, 0.35, refin);
            //LwPolyline Arc26 = new LwPolyline();
            //Arc26.Vertexes.Add(new LwPolylineVertex(v125));
            //Arc26.Vertexes.Add(new LwPolylineVertex(v128));
            //Arc26.Vertexes[0].Bulge = -h / 360;
            //fun.PolyFill(dxf, Arc26, 0.08, refin);
            LwPolyline Arc27 = new LwPolyline();
            Arc27.Vertexes.Add(new LwPolylineVertex(v122));
            Arc27.Vertexes.Add(new LwPolylineVertex(v129));
            Arc27.Vertexes[0].Bulge = -h / 360;
            fun.PolyFill(dxf, Arc27, 0.35, refin);
            //
            LwPolyline Arc28 = new LwPolyline();
            Arc28.Vertexes.Add(new LwPolylineVertex(v123));
            Arc28.Vertexes.Add(new LwPolylineVertex(v130));
            Arc28.Vertexes[0].Bulge = h / 360;
            fun.PolyFill(dxf, Arc28, 0.35, refin);
            //LwPolyline Arc29 = new LwPolyline();
            //Arc29.Vertexes.Add(new LwPolylineVertex(v125));
            //Arc29.Vertexes.Add(new LwPolylineVertex(v131));
            //Arc29.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc29, 0.08, refin);
            LwPolyline Arc30 = new LwPolyline();
            Arc30.Vertexes.Add(new LwPolylineVertex(v122));
            Arc30.Vertexes.Add(new LwPolylineVertex(v132));
            Arc30.Vertexes[0].Bulge = h / 400;
            fun.PolyFill(dxf, Arc30, 0.35, refin);
            Vector2[] Line116 = { v130, v133 };
            fun.drawPlinetype(dxf, Line116, 0.25, refin, Linetype.Dashed);
            //Vector2[] Line117 = { v131, v134 };
            //fun.drawPlinetype(dxf, Line117, refin, Linetype.Dashed);
            Vector2[] Line118 = { v132, v135 };
            fun.drawPlinetype(dxf, Line118, 0.25, refin, Linetype.Dashed);
            //
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v1.X - h / 6, v1.Y), new Vector2(v1.X + l1, v1.Y) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v27.X - h / 1.6, v27.Y + h / 22), new Vector2(v19.X + h + h / 6.8, v19.Y - h / 26) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v28.X - h / 1.6, v28.Y - h / 22), new Vector2(v18.X + h + h / 6.8, v18.Y + h / 26) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v49.X, v49.Y - h / 16), new Vector2(v49.X, v49.Y + h + h / 3.8) }, centre, Linetype.Center);
            //DimensionStyle dimensionStyle = fun.CreateDimStyle();
            //dimensionStyle.ArrowSize = 1;
            //dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.TextHeight = 0.8;
            //double offset = 6;
            //LinearDimension dim1 = new LinearDimension(new Line(v6, v7), offset * 3, 90, dimensionStyle);
            //dim1.UserText = "Φ25 ";
            //dxf.AddEntity(dim1);
            //LinearDimension dim2 = new LinearDimension(new Line(v32, v33), offset * 14, 90, dimensionStyle);
            //dim2.UserText = "Φ32 ";
            //dxf.AddEntity(dim2);
            //LinearDimension dim3 = new LinearDimension(new Line(v112, v113), offset * 3, 270, dimensionStyle);
            //dim3.UserText = "Φ21 ";
            //dxf.AddEntity(dim3);
            //LinearDimension dim4 = new LinearDimension(new Line(v70, v113), offset * 3, 360, dimensionStyle);
            //dim4.UserText = "105 ";
            //dxf.AddEntity(dim4);
            //LinearDimension dim5 = new LinearDimension(new Line(v32, v113), offset * 5, 360, dimensionStyle);
            //dim5.UserText = "125 ";
            //dxf.AddEntity(dim5);
            //LinearDimension dim6 = new LinearDimension(new Line(v7, v32), offset * 8, 360, dimensionStyle);
            //dim6.UserText = "56 ";
            //dxf.AddEntity(dim6);
            //
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint49(Dictionary<string, Object> data)   //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double h = 25;
            double pi = Math.PI;
            double epsr = 140 * pi / 180;
            double h1 = 32;
            double h3 = 21;
            double l1 = 56;
            double l2 = 125;
            double l3 = 105;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X, v1.Y + h / 4);
            Vector2 v3 = new Vector2(v1.X, v1.Y - h / 4);
            //
            Vector2 v4 = new Vector2(v2.X, v2.Y + h / 4);
            Vector2 v5 = new Vector2(v3.X, v3.Y - h / 4);
            //
            Vector2 v6 = new Vector2(v4.X + h / 10, v4.Y + h / 8);
            Vector2 v7 = new Vector2(v5.X + h / 10, v5.Y - h / 8);
            //
            Vector2 v8 = new Vector2(v6.X, v6.Y - h / 3);
            Vector2 v9 = new Vector2(v1.X, v8.Y - h / 10);
            //
            Vector2 v10 = new Vector2(v7.X, v7.Y + h / 3);
            Vector2 v11 = new Vector2(v1.X, v10.Y + h / 10);
            //
            Vector2 v12 = new Vector2(v6.X + l1 - h / 10, v6.Y);
            Vector2 v13 = new Vector2(v7.X + l1 - h / 10, v7.Y);
            //
            Vector2 v14 = new Vector2(v8.X + l1 - h / 2.6, v8.Y);
            Vector2 v15 = new Vector2(v10.X + l1 - h / 2.6, v10.Y);
            //
            Vector2 v16 = new Vector2(v8.X + h / 16, v8.Y);
            Vector2 v17 = new Vector2(v10.X + h / 16, v10.Y);
            Vector2 v18 = new Vector2(v17.X + (l1 - h / 2.6) / 2, v17.Y);
            Vector2 v19 = new Vector2(v16.X + (l1 - h / 2.6) / 2, v16.Y);
            Vector2 v20 = new Vector2(v18.X + h / 10, v1.Y);
            Vector2 v21 = new Vector2(v19.X + h / 10, v1.Y);
            //
            Vector2 v22 = new Vector2(v14.X + h / 22, v14.Y - h / 18);
            Vector2 v23 = new Vector2(v15.X + h / 22, v15.Y + h / 18);
            //
            Vector2 v24 = new Vector2(v14.X + (l1 - h / 10) - (l1 - h / 2.6) + h / 16, v14.Y);
            Vector2 v25 = new Vector2(v15.X + (l1 - h / 10) - (l1 - h / 2.6) + h / 16, v15.Y);
            Vector2 v26 = new Vector2(v24.X, v24.Y - h / 12);
            Vector2 v27 = new Vector2(v19.X + h / 30, v19.Y - h / 12);
            //
            Vector2 v28 = new Vector2(v18.X + h / 30, v18.Y + h / 12);
            Vector2 v29 = new Vector2(v25.X, v25.Y + h / 12);
            //
            Vector2 v30 = new Vector2(v1.X, v16.Y + h / 8);
            Vector2 v31 = new Vector2(v1.X, v17.Y - h / 8);
            //第二阶段
            Vector2 v32 = new Vector2(v12.X, v12.Y + (h1 - h));
            Vector2 v33 = new Vector2(v13.X, v13.Y - (h1 - h));
            //圆弧里得斜坡(上）
            Vector2 v34 = new Vector2(v19.X + h + h / 6.8 + h / 30, v19.Y - h / 26);
            Vector2 v35 = new Vector2(v19.X + h + h / 6.8, v27.Y);
            //
            Vector2 v36 = new Vector2(v34.X, v34.Y + h / 16);
            //
            Vector2 v37 = new Vector2(v19.X + h + h / 6.8 + h / 30, v25.Y + h / 26);
            Vector2 v38 = new Vector2(v19.X + h + h / 6.8, v29.Y);
            //
            Vector2 v39 = new Vector2(v37.X, v33.Y - h / 26);
            //
            Vector2 v40 = new Vector2(v29.X, v23.Y + h + h / 22);
            Vector2 v41 = new Vector2(v29.X, v25.Y - h / 20);
            //
            Vector2 v42 = new Vector2(v39.X + (l2 - l3) / 2, v39.Y);
            //
            Vector2 v43 = new Vector2(v42.X, v37.Y);
            //
            Vector2 v44 = new Vector2(v41.X + ((l2 - l3) / 2) * 2.3 / 3, v41.Y);
            Vector2 v45 = new Vector2(v44.X, v25.Y);
            Vector2 v46 = new Vector2(v45.X - h / 36, v37.Y);
            Vector2 v47 = new Vector2(v45.X, v37.Y);
            Vector2 v48 = new Vector2(v42.X, v25.Y);
            //
            Vector2 v49 = new Vector2(v41.X + (((l2 - l3) / 2) * 2.3 / 3) / 2, v41.Y - h / 16);
            Vector2 v50 = new Vector2(v44.X - (((l2 - l3) / 2) * 2.3 / 3) / 2, v44.Y - h / 16);
            //
            Vector2 v51 = new Vector2(v46.X + h / 36, v46.Y + h / 26);
            Vector2 v52 = new Vector2(v42.X, v51.Y);
            //
            Vector2 v53 = new Vector2(v32.X + (l2 - l3) / 2, v32.Y);
            Vector2 v54 = new Vector2(v53.X, v12.Y - h / 3.6);
            Vector2 v55 = new Vector2(v54.X - h / 2.707, v54.Y);
            Vector2 v56 = new Vector2(v55.X, v55.Y - h / 32);
            //
            Vector2 v57 = new Vector2(v32.X + (l2 - l3) / 6, v32.Y);
            Vector2 v58 = new Vector2(v57.X, v57.Y - h / 6);
            Vector2 v59 = new Vector2(v32.X + (l2 - l3) / 2.6, v32.Y);
            Vector2 v60 = new Vector2(v59.X, v57.Y - h / 6);
            Vector2 v61 = new Vector2(v49.X, v60.Y - h / 20);
            //
            Vector2 v62 = new Vector2(v54.X - h / 12, v54.Y);
            Vector2 v63 = new Vector2(v62.X - h / 20, v62.Y - h / 10.5);
            //
            Vector2 v64 = new Vector2(v62.X + h / 8, v62.Y - h / 20);
            Vector2 v65 = new Vector2(v54.X, v54.Y - h / 36);
            //
            Vector2 v66 = new Vector2(v51.X, v51.Y + h / 2.4);
            //
            Vector2 v67 = new Vector2(v66.X, v66.Y - (h / 2.4) / 2.3);
            //
            Vector2 v68 = new Vector2(v64.X + ((l2 - l3) / 2) * 2 / 3, v64.Y);
            Vector2 v69 = new Vector2(v68.X, v68.Y + (h1 - h));
            Vector2 v70 = new Vector2(v68.X + ((l2 - l3) / 2) * 1 / 3, v68.Y);
            //
            Vector2 v71 = new Vector2(v66.X, v66.Y + h / 8.3);
            //
            Vector2 v72 = new Vector2(v66.X - h / 26, v66.Y - (h / 2.4) / 3.2);
            Vector2 v73 = new Vector2(v48.X, v48.Y + h / 24);
            //
            Vector2 v74 = new Vector2(v73.X + (((l2 - l3) / 2) * 2.3 / 3.3) / 1.8, v73.Y - (((l2 - l3) / 2) * 2.3 / 3) / 2.6);
            //上半
            Vector2 v75 = new Vector2(v53.X + h / 36, v53.Y);
            Vector2 v76 = new Vector2(v75.X + ((l2 - l3) / 2) * 2.8 / 3.2, v75.Y - ((l2 - l3) / 2) * 2.6 / 3.6);
            Vector2 v77 = new Vector2(v76.X, v76.Y - h / 7);
            Vector2 v78 = new Vector2(v76.X + h / 8, v76.Y - h / 30);
            //
            Vector2 v79 = new Vector2(v78.X + l3 / 3, v78.Y);
            Vector2 v80 = new Vector2(v78.X, v78.Y - h / 3.2);
            //
            Vector2 v81 = new Vector2(v42.X + ((l2 - l3) / 2) * 2.8 / 3.2, v42.Y + ((l2 - l3) / 2) * 2.6 / 3.6);
            Vector2 v82 = new Vector2(v81.X + h / 8, v81.Y + h / 30);
            Vector2 v83 = new Vector2(v82.X + l3 / 3, v82.Y);
            Vector2 v84 = new Vector2(v81.X, v81.Y + h / 4);
            Vector2 v85 = new Vector2(v82.X, v82.Y + h / 4.7);
            //中间
            Vector2 v86 = new Vector2(v67.X + h / 4, v67.Y - h / 4);
            Vector2 v87 = new Vector2(v86.X, v86.Y - h / 6.3);
            Vector2 v88 = new Vector2(v86.X + h / 12, v86.Y - h / 16);
            Vector2 v89 = new Vector2(v88.X + h / 20, v88.Y + h / 2.1);
            Vector2 v90 = new Vector2(v89.X - h / 36, v89.Y);
            Vector2 v91 = new Vector2(v90.X, v90.Y + h / 8);
            Vector2 v92 = new Vector2(v90.X - h / 10, v90.Y + h / 9);
            Vector2 v93 = new Vector2(v89.X + h / 36, v89.Y + h / 9);
            //
            Vector2 v94 = new Vector2(v90.X - h / 5, v90.Y - h / 3.1);
            Vector2 v95 = new Vector2(v90.X - h / 3, v90.Y);
            //下边
            Vector2 v96 = new Vector2(v85.X + l3 * 2 / 3, v85.Y - h / 36);
            Vector2 v97 = new Vector2(v88.X + l3 * 2 / 2.9, v85.Y);
            //
            Vector2 v98 = new Vector2(v90.X + l3 / 4.6, v90.Y - h / 10);
            //
            Vector2 v99 = new Vector2(v96.X + l3 / 3 - l3 / 8, v96.Y - h / 6);
            Vector2 v100 = new Vector2(v99.X + l3 / 8, v99.Y);
            //
            Vector2 v101 = new Vector2(v79.X + l3 * 2 / 3, v79.Y + h / 80);
            Vector2 v102 = new Vector2(v101.X - l2 / 9, v1.Y + h / 6);
            Vector2 v103 = new Vector2(v102.X + h / 6, v102.Y + h / 8);
            Vector2 v104 = new Vector2(v103.X - h / 26, v101.Y);
            Vector2 v105 = new Vector2(v101.X - l2 / 3.2, v1.Y + h / 2.15);
            Vector2 v106 = new Vector2(v103.X - h / 1.9, v103.Y);
            Vector2 v107 = new Vector2(v102.X, v102.Y + h / 8);
            //
            Vector2 v108 = new Vector2(v101.X + h / 22, v101.Y - h / 3.2);
            Vector2 v109 = new Vector2(v108.X - h / 3, v108.Y - h / 30);
            Vector2 v110 = new Vector2(v109.X - h / 24, v101.Y);
            //下底右边
            Vector2 v111 = new Vector2(v108.X - h / 23, v108.Y - h / 200);
            Vector2 v112 = new Vector2(v111.X, v111.Y - h3 - h / 28);
            //上侧斜边
            Vector2 v113 = new Vector2(v110.X + h / 3.07, v110.Y + h / 40);
            //
            Vector2 v114 = new Vector2(v111.X - (h / 23) * 1.3, v111.Y - (h / 200) * 1.3);
            Vector2 v115 = new Vector2(v114.X, v114.Y - h3 / 1.2);
            //
            Vector2 v116 = new Vector2(v101.X + h / 40, v115.Y + h / 5.6);
            Vector2 v117 = new Vector2(v108.X - h / 3.1, v116.Y - h / 30);
            Vector2 v118 = new Vector2(v109.X - h / 40, v117.Y + h / 3.5);
            Vector2 v119 = new Vector2(v110.X + h / 3.1, v118.Y + h / 40);
            //虚线段
            Vector2 v120 = new Vector2(v1.X + l1, v1.Y);
            Vector2 v121 = new Vector2(v120.X + l2 + h / 3, v120.Y);
            //*/
            Vector2 v122 = new Vector2(v120.X + l2 / 1.2, v120.Y);
            Vector2 v123 = new Vector2(v120.X + l2 / 1.6, v120.Y);
            Vector2 v124 = new Vector2(v52.X, v37.Y);
            Vector2 v125 = new Vector2(v120.X + l2 / 1.4, v120.Y);
            //
            Vector2 v126 = new Vector2(v89.X - h / 36, v89.Y + h / 20);
            Vector2 v127 = new Vector2(v123.X + h * 1.59, v123.Y + h / 3.7);
            //
            Vector2 v128 = new Vector2(v127.X + h / 9, v123.Y + h / 4);
            Vector2 v129 = new Vector2(v128.X + h / 3.5, v128.Y - h / 10);
            //
            Vector2 v130 = new Vector2(v123.X + h * 1.3, v1.Y - h / 5);
            Vector2 v131 = new Vector2(v123.X + h * 1.3, v1.Y - h / 7);
            Vector2 v132 = new Vector2(v123.X + h * 1.3, v1.Y - h / 20);
            //
            Vector2 v133 = new Vector2(v130.X + h / 1.44, v130.Y + h / 16);
            Vector2 v134 = new Vector2(v131.X + h / 1.46, v131.Y + h / 16);
            Vector2 v135 = new Vector2(v132.X + h / 1.46, v132.Y + h / 16);
            //线段
            //主视图
            ////Vector2[] Line1 = { v1, v2 };
            ////fun.drawBLine(dxf, Line1, 0.15, contour);
            ////Vector2[] Line2 = { v1, v3 };
            ////fun.drawBLine(dxf, Line2, 0.15, contour);
            ////Vector2[] Line3 = { v2, v4 };
            ////fun.drawBLine(dxf, Line3, 0.15, contour);
            ////Vector2[] Line4 = { v3, v5 };
            ////fun.drawBLine(dxf, Line4, 0.15, contour);
            ////Vector2[] Line5 = { v4, v6 };
            ////fun.drawBLine(dxf, Line5, 0.15, contour);
            ////Vector2[] Line6 = { v5, v7 };
            ////fun.drawBLine(dxf, Line6, 0.15, contour);
            ////Vector2[] Line7 = { v6, v8 };
            ////fun.drawBLine(dxf, Line7, 0.15, contour);
            ////
            ////Vector2[] Line8 = { v9, v8 };
            ////fun.drawBLine(dxf, Line8, 0.15, contour);
            //////
            ////Vector2[] Line9 = { v7, v10 };
            ////fun.drawBLine(dxf, Line9, 0.15, contour);
            ////Vector2[] Line10 = { v11, v10 };
            ////fun.drawBLine(dxf, Line10, 0.15, contour);
            //////
            ////Vector2[] Line11 = { v12, v6 };
            ////fun.drawBLine(dxf, Line11, 0.15, contour);
            ////Vector2[] Line12 = { v13, v7 };
            ////fun.drawBLine(dxf, Line12, 0.15, contour);
            //Vector2[] Line13 = { v13, v12 };
            //fun.drawBLine(dxf, Line13, 0.15, contour);
            //////
            ////Vector2[] Line14 = { v14, v8 };
            ////fun.drawBLine(dxf, Line14, 0.15, contour);
            ////Vector2[] Line15 = { v14, v15 };
            ////fun.drawBLine(dxf, Line15, 0.15, contour);
            ////Vector2[] Line16 = { v15, v10 };
            ////fun.drawBLine(dxf, Line16, 0.15, contour);
            //////
            ////Vector2[] Line17 = { v17, v16 };
            ////fun.drawPlinetype(dxf, Line17, refin, Linetype.Dashed);
            ////Vector2[] Line18 = { v17, v18 };
            ////fun.drawPlinetype(dxf, Line18, refin, Linetype.Dashed);
            ////Vector2[] Line19 = { v16, v19 };
            ////fun.drawPlinetype(dxf, Line19, refin, Linetype.Dashed);
            ////Vector2[] Line20 = { v18, v19 };
            ////fun.drawPlinetype(dxf, Line20, refin, Linetype.Dashed);
            ////Vector2[] Line21 = { v18, v20 };
            ////fun.drawPlinetype(dxf, Line21, refin, Linetype.Dashed);
            ////Vector2[] Line22 = { v19, v21 };
            ////fun.drawPlinetype(dxf, Line22, refin, Linetype.Dashed);
            ////
            ////Vector2[] Line23 = { v14, v22 };
            ////fun.drawBLine(dxf, Line23, 0.15, contour);
            ////Vector2[] Line24 = { v15, v23 };
            ////fun.drawBLine(dxf, Line24, 0.15, contour);
            ////Vector2[] Line25 = { v22, v23 };
            ////fun.drawBLine(dxf, Line25, 0.15, contour);
            ////Vector2[] Line26 = { v14, v24 };
            ////fun.drawPlinetype(dxf, Line26, refin, Linetype.Dashed);
            ////Vector2[] Line27 = { v15, v25 };
            ////fun.drawPlinetype(dxf, Line27, refin, Linetype.Dashed);
            ////Vector2[] Line28 = { v26, v27 };
            ////fun.drawPlinetype(dxf, Line28, refin, Linetype.Dashed);
            ////Vector2[] Line29 = { v28, v29 };
            ////fun.drawPlinetype(dxf, Line29, refin, Linetype.Dashed);
            ////LwPolyline Arc1 = new LwPolyline();
            ////Arc1.Vertexes.Add(new LwPolylineVertex(v24));
            ////Arc1.Vertexes.Add(new LwPolylineVertex(v26));
            ////Arc1.Vertexes[0].Bulge = -h / 36;
            ////fun.PolyFill(dxf, Arc1, 0.08, refin);
            ////LwPolyline Arc2 = new LwPolyline();
            ////Arc2.Vertexes.Add(new LwPolylineVertex(v25));
            ////Arc2.Vertexes.Add(new LwPolylineVertex(v29));
            ////Arc2.Vertexes[0].Bulge = h / 36;
            ////fun.PolyFill(dxf, Arc2, 0.08, refin);
            ////Vector2[] Line30 = { v16, v30 };
            ////fun.drawBLine(dxf, Line30, 0.08, refin);
            ////Vector2[] Line31 = { v17, v31 };
            ////fun.drawBLine(dxf, Line31, 0.08, refin);
            ////
            //Vector2[] Line32 = { v32, v12 };
            //fun.drawBLine(dxf, Line32, 0.15, contour);
            //Vector2[] Line33 = { v33, v13 };
            //fun.drawBLine(dxf, Line33, 0.15, contour);
            //Vector2[] Line34 = { v34, v35 };
            //fun.drawBLine(dxf, Line34, 0.15, contour);
            //Vector2[] Line35 = { v34, v36 };
            //fun.drawBLine(dxf, Line35, 0.15, contour);
            //Vector2[] Line36 = { v37, v38 };
            //fun.drawBLine(dxf, Line36, 0.15, contour);
            //Vector2[] Line37 = { v39, v37 };
            //fun.drawBLine(dxf, Line37, 0.15, contour);
            //Vector2[] Line38 = { v39, v33 };
            //fun.drawBLine(dxf, Line38, 0.15, contour);
            ////Vector2[] Line39 = { v26, v29 };
            ////fun.drawPlinetype(dxf, Line39, refin, Linetype.Dashed);
            ////Vector2[] Line40 = { v24, v40 };
            ////fun.drawPlinetype(dxf, Line40, refin, Linetype.Dashed);
            ////Vector2[] Line41 = { v32, v40 };
            ////fun.drawPlinetype(dxf, Line41, refin, Linetype.Dashed);
            ////Vector2[] Line42 = { v25, v41 };
            ////fun.drawBLine(dxf, Line42, 0.08, skdimensioning);
            //Vector2[] Line43 = { v42, v39 };
            //fun.drawBLine(dxf, Line43, 0.15, contour);
            //Vector2[] Line44 = { v42, v43 };
            //fun.drawBLine(dxf, Line44, 0.15, contour);
            //Vector2[] Line45 = { v37, v43 };
            //fun.drawBLine(dxf, Line45, 0.15, contour);
            ////Vector2[] Line46 = { v41, v44 };
            ////fun.drawBLine(dxf, Line46, 0.08, skdimensioning);
            ////Vector2[] Line47 = { v45, v44 };
            ////fun.drawBLine(dxf, Line47, 0.08, skdimensioning);
            ////Vector2[] Line48 = { v45, v46 };
            ////fun.drawBLine(dxf, Line48, 0.08, skdimensioning);
            ////Vector2[] Line49 = { v45, v47 };
            ////fun.drawBLine(dxf, Line49, 0.08, skdimensioning);
            ////Vector2[] Line50 = { v48, v45 };
            ////fun.drawBLine(dxf, Line50, 0.08, skdimensioning);
            ////Vector2[] Line51 = { v49, v41 };
            ////fun.drawBLine(dxf, Line51, 0.08, skdimensioning);
            ////Vector2[] Line52 = { v50, v44 };
            ////fun.drawBLine(dxf, Line52, 0.08, skdimensioning);
            ////Vector2[] Line53 = { v51, v46 };
            ////fun.drawBLine(dxf, Line53, 0.08, skdimensioning);
            ////Vector2[] Line54 = { v51, v47 };
            ////fun.drawBLine(dxf, Line54, 0.08, skdimensioning);
            ////Vector2[] Line55 = { v51, v52 };
            ////fun.drawBLine(dxf, Line55, 0.08, skdimensioning);
            ////Vector2[] Line56 = { v48, v52 };
            ////fun.drawBLine(dxf, Line56, 0.08, skdimensioning);
            //Vector2[] Line57 = { v32, v53 };
            //fun.drawBLine(dxf, Line57, 0.15, contour);
            //Vector2[] Line58 = { v54, v53 };
            //fun.drawBLine(dxf, Line58, 0.15, contour);
            //Vector2[] Line59 = { v54, v55 };
            //fun.drawBLine(dxf, Line59, 0.15, contour);
            //Vector2[] Line60 = { v56, v55 };
            //fun.drawBLine(dxf, Line60, 0.15, contour);
            ////Vector2[] Line61 = { v57, v58 };
            ////fun.drawPlinetype(dxf, Line61, refin, Linetype.Dashed);
            ////Vector2[] Line62 = { v59, v60 };
            ////fun.drawPlinetype(dxf, Line62, refin, Linetype.Dashed);
            ////Vector2[] Line63 = { v58, v60 };
            ////fun.drawPlinetype(dxf, Line63, refin, Linetype.Dashed);
            ////Vector2[] Line64 = { v61, v60 };
            ////fun.drawPlinetype(dxf, Line64, refin, Linetype.Dashed);
            ////Vector2[] Line65 = { v61, v58 };
            ////fun.drawPlinetype(dxf, Line65, refin, Linetype.Dashed);
            //LwPolyline Arc3 = new LwPolyline();
            //Arc3.Vertexes.Add(new LwPolylineVertex(v53));
            //Arc3.Vertexes.Add(new LwPolylineVertex(v62));
            //Arc3.Vertexes[0].Bulge = h / 200;
            //fun.PolyFill(dxf, Arc3, 0.15, contour);
            //Vector2[] Line66 = { v63, v62 };
            //fun.drawBLine(dxf, Line66, 0.15, contour);
            //Vector2[] Line67 = { v34, v63 };
            //fun.drawBLine(dxf, Line67, 0.15, contour);
            //Vector2[] Line68 = { v64, v62 };
            //fun.drawBLine(dxf, Line68, 0.15, contour);
            //Vector2[] Line69 = { v65, v54 };
            //fun.drawBLine(dxf, Line69, 0.15, contour);
            ////Vector2[] Line70 = { v66, v51 };
            ////fun.drawBLine(dxf, Line70, 0.08, skdimensioning);
            ////
            //LwPolyline Arc4 = new LwPolyline();
            //Arc4.Vertexes.Add(new LwPolylineVertex(v63));
            //Arc4.Vertexes.Add(new LwPolylineVertex(v67));
            //Arc4.Vertexes[0].Bulge = h / 200;
            //fun.PolyFill(dxf, Arc4, 0.15, contour);
            //Vector2[] Line71 = { v64, v68 };
            //fun.drawBLine(dxf, Line71, 0.15, contour);
            //Vector2[] Line72 = { v69, v68 };
            //fun.drawBLine(dxf, Line72, 0.15, contour);
            //LwPolyline Arc5 = new LwPolyline();
            //Arc5.Vertexes.Add(new LwPolylineVertex(v53));
            //Arc5.Vertexes.Add(new LwPolylineVertex(v69));
            //Arc5.Vertexes[0].Bulge = -h / 180;
            //fun.PolyFill(dxf, Arc5, 0.15, contour);
            //Vector2[] Line73 = { v70, v68 };
            //fun.drawBLine(dxf, Line73, 0.15, contour);
            ////LwPolyline Arc6 = new LwPolyline();
            ////Arc6.Vertexes.Add(new LwPolylineVertex(v66));
            ////Arc6.Vertexes.Add(new LwPolylineVertex(v71));
            ////Arc6.Vertexes[0].Bulge = -h / 80;
            ////fun.PolyFill(dxf, Arc6, 0.08, skdimensioning);
            ////Vector2[] Line74 = { v71, v66 };
            ////fun.drawBLine(dxf, Line74, 0.08, skdimensioning);
            //LwPolyline Arc7 = new LwPolyline();
            //Arc7.Vertexes.Add(new LwPolylineVertex(v69));
            //Arc7.Vertexes.Add(new LwPolylineVertex(v70));
            //Arc7.Vertexes[0].Bulge = -h / 200;
            //fun.PolyFill(dxf, Arc7, 0.15, contour);
            //Vector2[] Line75 = { v73, v72 };
            //fun.drawBLine(dxf, Line75, 0.15, contour);
            //Vector2[] Line76 = { v73, v74 };
            //fun.drawBLine(dxf, Line76, 0.15, contour);
            //Vector2[] Line77 = { v75, v76 };
            //fun.drawBLine(dxf, Line77, 0.15, contour);
            //Vector2[] Line78 = { v75, v53 };
            //fun.drawBLine(dxf, Line78, 0.15, contour);
            //Vector2[] Line79 = { v76, v77 };
            //fun.drawBLine(dxf, Line79, 0.15, contour);
            //LwPolyline Arc8 = new LwPolyline();
            //Arc8.Vertexes.Add(new LwPolylineVertex(v76));
            //Arc8.Vertexes.Add(new LwPolylineVertex(v78));
            //Arc8.Vertexes[0].Bulge = h / 160;
            //fun.PolyFill(dxf, Arc8, 0.15, contour);
            //Vector2[] Line80 = { v78, v79 };
            //fun.drawBLine(dxf, Line80, 0.15, contour);
            //Vector2[] Line81 = { v78, v80 };
            //fun.drawBLine(dxf, Line81, 0.15, contour);
            ////
            //Vector2[] Line82 = { v70, v80 };
            //fun.drawBLine(dxf, Line82, 0.15, contour);
            //Vector2[] Line83 = { v42, v81 };
            //fun.drawBLine(dxf, Line83, 0.15, contour);
            //LwPolyline Arc9 = new LwPolyline();
            //Arc9.Vertexes.Add(new LwPolylineVertex(v81));
            //Arc9.Vertexes.Add(new LwPolylineVertex(v82));
            //Arc9.Vertexes[0].Bulge = -h / 160;
            //fun.PolyFill(dxf, Arc9, 0.15, contour);
            //Vector2[] Line84 = { v83, v82 };
            //fun.drawBLine(dxf, Line84, 0.15, contour);
            //Vector2[] Line85 = { v84, v81 };
            //fun.drawBLine(dxf, Line85, 0.15, contour);
            //LwPolyline Arc10 = new LwPolyline();
            //Arc10.Vertexes.Add(new LwPolylineVertex(v74));
            //Arc10.Vertexes.Add(new LwPolylineVertex(v84));
            //Arc10.Vertexes[0].Bulge = h / 100;
            //fun.PolyFill(dxf, Arc10, 0.15, contour);
            //Vector2[] Line86 = { v85, v82 };
            //fun.drawBLine(dxf, Line86, 0.15, contour);
            //LwPolyline Arc11 = new LwPolyline();
            //Arc11.Vertexes.Add(new LwPolylineVertex(v85));
            //Arc11.Vertexes.Add(new LwPolylineVertex(v84));
            //Arc11.Vertexes[0].Bulge = h / 120;
            //fun.PolyFill(dxf, Arc11, 0.15, contour);
            //Vector2[] Line87 = { v86, v67 };
            //fun.drawBLine(dxf, Line87, 0.15, contour);
            //Vector2[] Line88 = { v86, v87 };
            //fun.drawBLine(dxf, Line88, 0.15, contour);
            //Vector2[] Line89 = { v86, v88 };
            //fun.drawBLine(dxf, Line89, 0.15, contour);
            //Vector2[] Line90 = { v89, v88 };
            //fun.drawBLine(dxf, Line90, 0.15, contour);
            //Vector2[] Line91 = { v89, v90 };
            //fun.drawBLine(dxf, Line91, 0.15, contour);
            //Vector2[] Line92 = { v91, v90 };
            //fun.drawBLine(dxf, Line92, 0.15, contour);
            //Vector2[] Line93 = { v92, v90 };
            //fun.drawBLine(dxf, Line93, 0.15, contour);
            //Vector2[] Line94 = { v93, v89 };
            //fun.drawBLine(dxf, Line94, 0.15, contour);
            //LwPolyline Arc12 = new LwPolyline();
            //Arc12.Vertexes.Add(new LwPolylineVertex(v90));
            //Arc12.Vertexes.Add(new LwPolylineVertex(v94));
            //Arc12.Vertexes[0].Bulge = h / 80;
            //fun.PolyFill(dxf, Arc12, 0.15, contour);
            ////Vector2[] Line95 = { v90, v95 };
            ////fun.drawPlinetype(dxf, Line95, refin, Linetype.Dashed);
            //LwPolyline Arc13 = new LwPolyline();
            //Arc13.Vertexes.Add(new LwPolylineVertex(v85));
            //Arc13.Vertexes.Add(new LwPolylineVertex(v96));
            //Arc13.Vertexes[0].Bulge = h / 180;
            //fun.PolyFill(dxf, Arc13, 0.15, contour);
            //LwPolyline Arc14 = new LwPolyline();
            //Arc14.Vertexes.Add(new LwPolylineVertex(v88));
            //Arc14.Vertexes.Add(new LwPolylineVertex(v97));
            //Arc14.Vertexes[0].Bulge = h / 160;
            //fun.PolyFill(dxf, Arc14, 0.15, contour);
            //Vector2[] Line96 = { v96, v80 };
            //fun.drawBLine(dxf, Line96, 0.15, contour);
            //Vector2[] Line97 = { v98, v90 };
            //fun.drawBLine(dxf, Line97, 0.15, contour);
            //LwPolyline Arc15 = new LwPolyline();
            //Arc15.Vertexes.Add(new LwPolylineVertex(v96));
            //Arc15.Vertexes.Add(new LwPolylineVertex(v99));
            //Arc15.Vertexes[0].Bulge = h / 260;
            //fun.PolyFill(dxf, Arc15, 0.15, contour);
            //Vector2[] Line98 = { v100, v99 };
            //fun.drawBLine(dxf, Line98, 0.15, contour);
            //Vector2[] Line99 = { v101, v79 };
            //fun.drawBLine(dxf, Line99, 0.07, contour);
            //LwPolyline Arc16 = new LwPolyline();
            //Arc16.Vertexes.Add(new LwPolylineVertex(v79));
            //Arc16.Vertexes.Add(new LwPolylineVertex(v102));
            //Arc16.Vertexes[0].Bulge = -h / 260;
            //fun.PolyFill(dxf, Arc16, 0.15, contour);
            //LwPolyline Arc17 = new LwPolyline();
            //Arc17.Vertexes.Add(new LwPolylineVertex(v103));
            //Arc17.Vertexes.Add(new LwPolylineVertex(v102));
            //Arc17.Vertexes[0].Bulge = -h / 44;
            //fun.PolyFill(dxf, Arc17, 0.15, contour);
            //Vector2[] Line100 = { v103, v104 };
            //fun.drawBLine(dxf, Line100, 0.15, contour);
            //LwPolyline Arc18 = new LwPolyline();
            //Arc18.Vertexes.Add(new LwPolylineVertex(v104));
            //Arc18.Vertexes.Add(new LwPolylineVertex(v105));
            //Arc18.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc18, 0.15, contour);
            //Vector2[] Line101 = { v103, v106 };
            //fun.drawBLine(dxf, Line101, 0.15, contour);
            //Vector2[] Line102 = { v102, v107 };
            //fun.drawBLine(dxf, Line102, 0.15, contour);
            //Vector2[] Line103 = { v101, v108 };
            //fun.drawBLine(dxf, Line103, 0.15, contour);
            //Vector2[] Line104 = { v109, v108 };
            //fun.drawBLine(dxf, Line104, 0.15, contour);
            //Vector2[] Line105 = { v109, v110 };
            //fun.drawBLine(dxf, Line105, 0.15, contour);
            //Vector2[] Line106 = { v111, v112 };
            //fun.drawBLine(dxf, Line106, 0.2, contour);
            //Vector2[] Line107 = { v110, v113 };
            //fun.drawBLine(dxf, Line107, 0.15, contour);
            //Vector2[] Line108 = { v101, v113 };
            //fun.drawBLine(dxf, Line108, 0.15, contour);
            //Vector2[] Line109 = { v114, v115 };
            //fun.drawBLine(dxf, Line109, 0.15, contour);
            //Vector2[] Line110 = { v112, v115 };
            //fun.drawBLine(dxf, Line110, 0.15, contour);
            //
            //Vector2[] Line111 = { v116, v117 };
            //fun.drawBLine(dxf, Line111, 0.15, contour);
            //Vector2[] Line112 = { v118, v117 };
            //fun.drawBLine(dxf, Line112, 0.15, contour);
            //Vector2[] Line113 = { v118, v119 };
            //fun.drawBLine(dxf, Line113, 0.15, contour);
            //Vector2[] Line114 = { v116, v119 };
            //fun.drawBLine(dxf, Line114, 0.15, contour);
            //Vector2[] Line115 = { v120, v121 };
            //fun.drawBLine(dxf, Line115, 0.08, skdimensioning);
            //
            //LwPolyline Arc19 = new LwPolyline();
            //Arc19.Vertexes.Add(new LwPolylineVertex(v48));
            //Arc19.Vertexes.Add(new LwPolylineVertex(v122));
            //Arc19.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc19, 0.08, refin);
            //LwPolyline Arc20 = new LwPolyline();
            //Arc20.Vertexes.Add(new LwPolylineVertex(v52));
            //Arc20.Vertexes.Add(new LwPolylineVertex(v123));
            //Arc20.Vertexes[0].Bulge = h / 300;
            //fun.PolyFill(dxf, Arc20, 0.08, refin);
            //LwPolyline Arc21 = new LwPolyline();
            //Arc21.Vertexes.Add(new LwPolylineVertex(v125));
            //Arc21.Vertexes.Add(new LwPolylineVertex(v124));
            //Arc21.Vertexes[0].Bulge = -h / 320;
            //fun.PolyFill(dxf, Arc21, 0.08, refin);
            ////
            //LwPolyline Arc22 = new LwPolyline();
            //Arc22.Vertexes.Add(new LwPolylineVertex(v90));
            //Arc22.Vertexes.Add(new LwPolylineVertex(v123));
            //Arc22.Vertexes[0].Bulge = -h / 400;
            //fun.PolyFill(dxf, Arc22, 0.08, refin);
            //LwPolyline Arc23 = new LwPolyline();
            //Arc23.Vertexes.Add(new LwPolylineVertex(v125));
            //Arc23.Vertexes.Add(new LwPolylineVertex(v126));
            //Arc23.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc23, 0.08, refin);
            //LwPolyline Arc24 = new LwPolyline();
            //Arc24.Vertexes.Add(new LwPolylineVertex(v71));
            //Arc24.Vertexes.Add(new LwPolylineVertex(v122));
            //Arc24.Vertexes[0].Bulge = -h / 320;
            //fun.PolyFill(dxf, Arc24, 0.08, refin);
            //LwPolyline Arc25 = new LwPolyline();
            //Arc25.Vertexes.Add(new LwPolylineVertex(v123));
            //Arc25.Vertexes.Add(new LwPolylineVertex(v127));
            //Arc25.Vertexes[0].Bulge = -h / 360;
            //fun.PolyFill(dxf, Arc25, 0.08, refin);
            //LwPolyline Arc26 = new LwPolyline();
            //Arc26.Vertexes.Add(new LwPolylineVertex(v125));
            //Arc26.Vertexes.Add(new LwPolylineVertex(v128));
            //Arc26.Vertexes[0].Bulge = -h / 360;
            //fun.PolyFill(dxf, Arc26, 0.08, refin);
            //LwPolyline Arc27 = new LwPolyline();
            //Arc27.Vertexes.Add(new LwPolylineVertex(v122));
            //Arc27.Vertexes.Add(new LwPolylineVertex(v129));
            //Arc27.Vertexes[0].Bulge = -h / 360;
            //fun.PolyFill(dxf, Arc27, 0.08, refin);
            ////
            //LwPolyline Arc28 = new LwPolyline();
            //Arc28.Vertexes.Add(new LwPolylineVertex(v123));
            //Arc28.Vertexes.Add(new LwPolylineVertex(v130));
            //Arc28.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc28, 0.08, refin);
            //LwPolyline Arc29 = new LwPolyline();
            //Arc29.Vertexes.Add(new LwPolylineVertex(v125));
            //Arc29.Vertexes.Add(new LwPolylineVertex(v131));
            //Arc29.Vertexes[0].Bulge = h / 360;
            //fun.PolyFill(dxf, Arc29, 0.08, refin);
            //LwPolyline Arc30 = new LwPolyline();
            //Arc30.Vertexes.Add(new LwPolylineVertex(v122));
            //Arc30.Vertexes.Add(new LwPolylineVertex(v132));
            //Arc30.Vertexes[0].Bulge = h / 400;
            //fun.PolyFill(dxf, Arc30, 0.08, refin);
            //Vector2[] Line116 = { v130, v133 };
            //fun.drawPlinetype(dxf, Line116, refin, Linetype.Dashed);
            //Vector2[] Line117 = { v131, v134 };
            //fun.drawPlinetype(dxf, Line117, refin, Linetype.Dashed);
            //Vector2[] Line118 = { v132, v135 };
            //fun.drawPlinetype(dxf, Line118, refin, Linetype.Dashed);
            //
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v1.X - h / 6, v1.Y), new Vector2(v1.X + l1, v1.Y) }, 0.25,centre, Linetype.Center);
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v27.X - h / 1.6, v27.Y + h / 22), new Vector2(v19.X + h + h / 6.8, v19.Y - h / 26) },0.25, centre, Linetype.Center);
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v28.X - h / 1.6, v28.Y - h / 22), new Vector2(v18.X + h + h / 6.8, v18.Y + h / 26) },0.25, centre, Linetype.Center);
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v49.X, v49.Y - h / 16), new Vector2(v49.X, v49.Y + h + h / 3.8) }, 0.25,centre, Linetype.Center);
            //DimensionStyle dimensionStyle = fun.CreateDimStyle();
            //dimensionStyle.ArrowSize = 1;
            //dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.TextHeight = 0.8;
            //double offset = 6;
            //LinearDimension dim1 = new LinearDimension(new Line(v6, v7), offset * 3, 90, dimensionStyle);
            //dim1.UserText = "Φ25 ";
            //dxf.AddEntity(dim1);
            //LinearDimension dim2 = new LinearDimension(new Line(v32, v33), offset * 14, 90, dimensionStyle);
            //dim2.UserText = "Φ32 ";
            //dxf.AddEntity(dim2);
            //LinearDimension dim3 = new LinearDimension(new Line(v112, v113), offset * 3, 270, dimensionStyle);
            //dim3.UserText = "Φ21 ";
            //dxf.AddEntity(dim3);
            //LinearDimension dim4 = new LinearDimension(new Line(v70, v113), offset * 3, 360, dimensionStyle);
            //dim4.UserText = "105 ";
            //dxf.AddEntity(dim4);
            //LinearDimension dim5 = new LinearDimension(new Line(v32, v113), offset * 5, 360, dimensionStyle);
            //dim5.UserText = "125 ";
            //dxf.AddEntity(dim5);
            //LinearDimension dim6 = new LinearDimension(new Line(v7, v32), offset * 8, 360, dimensionStyle);
            //dim6.UserText = "56 ";
            //dxf.AddEntity(dim6);
            //
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        //
        //16IR 11UN
        public static void Matingpoint51(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double l = 3.5;
            double pi = Math.PI;
            double epsr = 45 * pi / 180;
            double l2 = 3.63;
            double h = 16.5;
            double ch = 1.12;
            double cl = 1.5;
            double r = 0.14;
            double fai = 9.52;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + l, v1.Y);
            Vector2 v3 = new Vector2(v1.X + l / 8, v1.Y - l / 4);
            Vector2 v4 = new Vector2(v2.X, v1.Y - l / 4);
            //
            Vector2 v5 = new Vector2(v3.X + l / 8, v3.Y - l / 4);
            Vector2 v6 = new Vector2(v5.X - l / 8, v5.Y - l / 2);
            Vector2 v7 = new Vector2(v1.X, v6.Y - l / 10);
            Vector2 v8 = new Vector2(v7.X, v7.Y - l / 1.6);
            Vector2 v9 = new Vector2(v8.X + l / 5, v8.Y - l / 3);
            Vector2 v10 = new Vector2(v8.X, v8.Y - l * 2);
            //
            Vector2 v11 = new Vector2(v4.X, v10.Y);
            Vector2 v12 = new Vector2(v11.X, v11.Y - l / 10);
            //底上线
            Vector2 v13 = new Vector2(v10.X + l / 8, v10.Y + l / 3);
            //
            Vector2 v14 = new Vector2(v4.X, v13.Y);
            //
            Vector2 v15 = new Vector2(v11.X, v11.Y - l / 10);
            //
            Vector2 v16 = new Vector2(v15.X - l / 1.2, v15.Y);
            //
            Vector2 v17 = new Vector2(v16.X, v10.Y);
            Vector2 v18 = new Vector2(v13.X, v13.Y + l / 16);
            Vector2 v19 = new Vector2(v18.X + l / 1.16, v18.Y);
            //
            Vector2 v20 = new Vector2(v18.X + l / 20, v18.Y + l / 3);
            Vector2 v21 = new Vector2(v4.X, v20.Y);
            //旋转三角刀片
            Vector2 v22 = new Vector2(v1.X + h * 2, v1.Y - h / 2.2);
            //切削面
            Vector2 v23 = new Vector2(v22.X - h / 14, v22.Y - fai / 2);
            Vector2 v24 = new Vector2(v22.X - fai / 1.76, v22.Y + h / 6.9);
            //切线you
            Vector2 v25 = new Vector2(v22.X + fai / 2, v22.Y);
            Vector2 v26 = new Vector2(v25.X, v25.Y + h / 2 - ch * 2);
            //
            Vector2 v27 = new Vector2(v26.X, v26.Y + ch * 2);
            Vector2 v28 = new Vector2(v26.X - cl / 2, v26.Y);
            //zuo
            Vector2 v29 = new Vector2(v27.X - cl * 2.7, v26.Y);
            Vector2 v30 = new Vector2(v29.X - (cl * 2.74) * 1.86, v29.Y - ch * 4.06);
            //切线右尺口
            Vector2 v31 = new Vector2(v28.X - cl / 3.2, v28.Y + ch / 1.3);
            Vector2 v32 = new Vector2(v31.X - (cl - cl / 3.2 - cl / 2) * 3, v31.Y);
            Vector2 v33 = new Vector2(v32.X - cl / 3.2, v28.Y);
            //上侧横线
            Vector2 v34 = new Vector2(v25.X, v25.Y + h / 2 - ch * 4.2);
            Vector2 v35 = new Vector2(v34.X - fai / 1.2, v34.Y);
            //下部分端口
            Vector2 v36 = new Vector2(v25.X, v25.Y - h / 2 + ch * 5.2);
            Vector2 v37 = new Vector2(v36.X, v36.Y - ch * 5.2);
            //下端斜线
            Vector2 v38 = new Vector2(v32.X, v37.Y + ch);
            Vector2 v39 = new Vector2(v38.X - (cl * 2.74) * 2.2, v38.Y + ch * 4.8);
            //下端尺口
            Vector2 v40 = new Vector2(v38.X + (cl / 2.6) * Math.Sin(epsr), v38.Y + cl / 2 * Math.Sin(epsr));
            Vector2 v41 = new Vector2(v40.X + ch * 1.1, v40.Y + cl / 3.2);
            Vector2 v42 = new Vector2(v41.X, v41.Y + (cl - cl / 3.2 - cl / 2) * 3);
            Vector2 v43 = new Vector2(v40.X + cl / 3.6, v42.Y + cl / 3.2);
            //
            Vector2 v44 = new Vector2(v38.X - cl * 1.2, v38.Y + cl / 1.4);
            Vector2 v45 = new Vector2(v25.X, v25.Y + cl * 1.2);
            //
            Vector2 v46 = new Vector2(v30.X - ch * 2.08, v30.Y - ch * 1.28);
            Vector2 v47 = new Vector2(v39.X - ch * 2.6, v39.Y + ch * 1.6);
            //
            Vector2 v48 = new Vector2(v30.X + (cl / 2.6) * Math.Sin(epsr), v30.Y - cl / 2 * Math.Sin(epsr));
            Vector2 v49 = new Vector2(v48.X - cl / 4, v48.Y - ch * 1.7);
            Vector2 v50 = new Vector2(v49.X + (cl - cl / 3.2 - cl / 2) * 3, v49.Y - (cl - cl / 3.2 - cl / 2) * 3 / 2);
            Vector2 v51 = new Vector2(v50.X + cl / 2.6, v50.Y + cl / 2.3);
            //
            Vector2 v52 = new Vector2(v38.X - (cl * 2.74) * 1.7, v38.Y + ch * 3.6);
            //线段
            //主视图
            Vector2[] Line1 = { v1, v2 };
            fun.drawBLine(dxf, Line1, 0.5, contour);
            Vector2[] Line2 = { v4, v2 };
            fun.drawBLine(dxf, Line2, 0.5, contour);
            Vector2[] Line3 = { v1, v3 };
            fun.drawBLine(dxf, Line3, 0.5, contour);
            Vector2[] Line4 = { v4, v3 };
            fun.drawBLine(dxf, Line4, 0.5, contour);
            Vector2[] Line5 = { v5, v3 };
            fun.drawBLine(dxf, Line5, 0.5, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            Arc1.Vertexes.Add(new LwPolylineVertex(v6));
            Arc1.Vertexes[0].Bulge = -l / 10;
            fun.PolyFill(dxf, Arc1, 0.5, contour);
            Vector2[] Line6 = { v6, v7 };
            fun.drawBLine(dxf, Line6, 0.5, contour);
            Vector2[] Line7 = { v8, v7 };
            fun.drawBLine(dxf, Line7, 0.5, contour);
            Vector2[] Line8 = { v8, v9 };
            fun.drawBLine(dxf, Line8, 0.5, contour);
            Vector2[] Line9 = { v8, v10 };
            fun.drawBLine(dxf, Line9, 0.5, contour);
            Vector2[] Line10 = { v4, v11 };
            fun.drawBLine(dxf, Line10, 0.5, contour);
            Vector2[] Line11 = { v10, v11 };
            fun.drawBLine(dxf, Line11, 0.5, contour);
            Vector2[] Line12 = { v10, v13 };
            fun.drawBLine(dxf, Line12, 0.5, contour);
            Vector2[] Line13 = { v9, v13 };
            fun.drawBLine(dxf, Line13, 0.5, contour);
            Vector2[] Line14 = { v14, v13 };
            fun.drawBLine(dxf, Line14, 0.5, contour);
            Vector2[] Line15 = { v15, v11 };
            fun.drawBLine(dxf, Line15, 0.5, contour);
            Vector2[] Line16 = { v15, v16 };
            fun.drawBLine(dxf, Line16, 0.5, contour);
            Vector2[] Line17 = { v17, v16 };
            fun.drawBLine(dxf, Line17, 0.5, contour);
            Vector2[] Line18 = { v19, v18 };
            fun.drawBLine(dxf, Line18, 0.5, contour);
            Vector2[] Line19 = { v20, v21 };
            fun.drawBLine(dxf, Line19, 0.5, contour);
            //内切削面
            Vector2[] Line20 = { v23, v24 };
            fun.drawBLine(dxf, Line20, 0.5, contour);
            //切线
            Vector2[] Line21 = { v25, v26 };
            fun.drawBLine(dxf, Line21, 0.5, contour);
            //切上
            Vector2[] Line22 = { v27, v26 };
            fun.drawBLine(dxf, Line22, 0.25, skdimensioning);
            Vector2[] Line23 = { v26, v28 };
            fun.drawBLine(dxf, Line23, 0.5, contour);
            //zou
            Vector2[] Line24 = { v27, v29 };
            fun.drawBLine(dxf, Line24, 0.25, skdimensioning);
            Vector2[] Line25 = { v29, v30 };
            fun.drawBLine(dxf, Line25, 0.5, contour);
            //右尺口
            Vector2[] Line26 = { v28, v31 };
            fun.drawBLine(dxf, Line26, 0.5, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v32));
            Arc2.Vertexes.Add(new LwPolylineVertex(v31));
            Arc2.Vertexes[0].Bulge = -r * 4.6;
            fun.PolyFill(dxf, Arc2, 0.5, contour);
            Vector2[] Line27 = { v33, v32 };
            fun.drawBLine(dxf, Line27, 0.5, contour);
            Vector2[] Line28 = { v33, v29 };
            fun.drawBLine(dxf, Line28, 0.5, contour);
            Vector2[] Line29 = { v34, v35 };
            fun.drawBLine(dxf, Line29, 0.5, contour);
            //下半部分
            Vector2[] Line30 = { v25, v36 };
            fun.drawBLine(dxf, Line30, 0.5, contour);
            Vector2[] Line31 = { v37, v36 };
            fun.drawBLine(dxf, Line31, 0.25, skdimensioning);
            //下端斜线
            Vector2[] Line32 = { v37, v38 };
            fun.drawBLine(dxf, Line32, 0.25, skdimensioning);
            //Vector2[] Line33 = { v38, v39 };
            //fun.drawBLine(dxf, Line33, 0.15, contour);
            //下端尺口
            Vector2[] Line34 = { v38, v40 };
            fun.drawBLine(dxf, Line34, 0.5, contour);
            Vector2[] Line35 = { v41, v40 };
            fun.drawBLine(dxf, Line35, 0.5, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v42));
            Arc3.Vertexes.Add(new LwPolylineVertex(v41));
            Arc3.Vertexes[0].Bulge = -r * 4.6;
            fun.PolyFill(dxf, Arc3, 0.5, contour);
            Vector2[] Line36 = { v43, v42 };
            fun.drawBLine(dxf, Line36, 0.5, contour);
            Vector2[] Line37 = { v43, v36 };
            fun.drawBLine(dxf, Line37, 0.5, contour);
            //
            Vector2[] Line38 = { v44, v45 };
            fun.drawBLine(dxf, Line38, 0.5, contour);
            //
            Vector2[] Line39 = { v30, v46 };
            fun.drawBLine(dxf, Line39, 0.25, skdimensioning);
            Vector2[] Line40 = { v39, v47 };
            fun.drawBLine(dxf, Line40, 0.25, skdimensioning);
            Arc arc1 = fun.DrawArc(v32, new Vector2(v32.X - 6, v32.Y + 5), v32);
            Arc arc2 = fun.DrawArc(v22, new Vector2(v22.X - 2, v22.Y - 10), v22);
            //
            Vector2[] Line41 = { v30, v48 };
            fun.drawBLine(dxf, Line41, 0.5, contour);
            Vector2[] Line42 = { v49, v48 };
            fun.drawBLine(dxf, Line42, 0.5, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v49));
            Arc4.Vertexes.Add(new LwPolylineVertex(v50));
            Arc4.Vertexes[0].Bulge = r * 4.6;
            fun.PolyFill(dxf, Arc4, 0.5, contour);
            Vector2[] Line43 = { v50, v51 };
            fun.drawBLine(dxf, Line43, 0.5, contour);
            //
            Vector2[] Line44 = { v38, v52 };
            fun.drawBLine(dxf, Line44, 0.5, contour);
            Vector2[] Line45 = { v51, v52 };
            fun.drawBLine(dxf, Line45, 0.5, contour);
            //
            Vector2[] Line46 = { v47, v52 };
            fun.drawBLine(dxf, Line46, 0.25, skdimensioning);
            //
            LwPolyline poly = new LwPolyline();
            poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 3)));
            poly.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, Math.PI, fai / 3)));
            poly.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 3)));
            fun.PolyFill(dxf, poly, 0.5, contour);
            LwPolyline poly1 = new LwPolyline();
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, h / 7.5)));
            poly1.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, Math.PI, h / 7.5)));
            poly1.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, h / 7.5)));
            fun.PolyFill(dxf, poly1, 0.5, contour);
            LwPolyline poly2 = new LwPolyline();
            poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 2)));
            poly2.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, Math.PI, fai / 2)));
            poly2.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 2)));
            fun.PolyFill(dxf, poly2, 0.35, refin);
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v22.X - fai / 2 - 1, v22.Y), new Vector2(v22.X + fai / 2 + 1, v22.Y) },0.25, centre, Linetype.Center);
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v22.X, v22.Y + fai / 2 + 1), new Vector2(v22.X, v22.Y - fai / 2 - 1) }, 0.25,centre, Linetype.Center);
            //
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v20.X - l / 6, v20.Y + (fai / 2) * 1.1), new Vector2(v21.X + l / 25, v21.Y + (fai / 2) * 1.1) },0.25, centre, Linetype.Center);
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v20.X - l / 6, v20.Y + (fai / 2) / 4), new Vector2(v21.X + l / 25, v21.Y + (fai / 2) / 4) }, 0.25,centre, Linetype.Center);
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v20.X - l / 6, v20.Y + (fai / 2) / 1.47), new Vector2(v21.X + l / 25, v21.Y + (fai / 2) / 1.47) },0.25, centre, Linetype.Center);
            //
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 1;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 0.8;
            double offset = 6;
            LinearDimension dim1 = new LinearDimension(new Line(v1, v2), offset, 360, dimensionStyle);
            dim1.UserText = "3.5 ";
            dxf.AddEntity(dim1);
            LinearDimension dim2 = new LinearDimension(new Line(v10, v11), offset, 180, dimensionStyle);
            dim2.UserText = "3.63 ";
            dxf.AddEntity(dim2);
            //
            LinearDimension dim3 = new LinearDimension(new Line(v27, v37), offset * 2, 270, dimensionStyle);
            dim3.UserText = "16.5 ";
            dxf.AddEntity(dim3);
            LinearDimension dim4 = new LinearDimension(new Line(v27, v31), offset * 1.2, 270, dimensionStyle);
            dim4.UserText = "1.12 ";
            dxf.AddEntity(dim4);
            LinearDimension dim5 = new LinearDimension(new Line(v27, v31), offset * 1.2, 360, dimensionStyle);
            dim5.UserText = "1.5 ";
            dxf.AddEntity(dim5);
            //
            RadialDimension dimrad1 = new RadialDimension(arc1, -36, 1, dimensionStyle);
            dimrad1.UserText = "R0.14";
            dxf.AddEntity(dimrad1);
            //
            RadialDimension dimrad2 = new RadialDimension(arc2, 79, 1, dimensionStyle);
            dimrad2.UserText = "Φ9.52";
            dxf.AddEntity(dimrad2);
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint52(Dictionary<string, Object> data)//转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double l = 3.5;
            double pi = Math.PI;
            double epsr = 45 * pi / 180;
            double l2 = 3.63;
            double h = 16.5;
            double ch = 1.12;
            double cl = 1.5;
            double r = 0.14;
            double fai = 9.52;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + l, v1.Y);
            Vector2 v3 = new Vector2(v1.X + l / 8, v1.Y - l / 4);
            Vector2 v4 = new Vector2(v2.X, v1.Y - l / 4);
            //
            Vector2 v5 = new Vector2(v3.X + l / 8, v3.Y - l / 4);
            Vector2 v6 = new Vector2(v5.X - l / 8, v5.Y - l / 2);
            Vector2 v7 = new Vector2(v1.X, v6.Y - l / 10);
            Vector2 v8 = new Vector2(v7.X, v7.Y - l / 1.6);
            Vector2 v9 = new Vector2(v8.X + l / 5, v8.Y - l / 3);
            Vector2 v10 = new Vector2(v8.X, v8.Y - l * 2);
            //
            Vector2 v11 = new Vector2(v4.X, v10.Y);
            Vector2 v12 = new Vector2(v11.X, v11.Y - l / 10);
            //底上线
            Vector2 v13 = new Vector2(v10.X + l / 8, v10.Y + l / 3);
            //
            Vector2 v14 = new Vector2(v4.X, v13.Y);
            //
            Vector2 v15 = new Vector2(v11.X, v11.Y - l / 10);
            //
            Vector2 v16 = new Vector2(v15.X - l / 1.2, v15.Y);
            //
            Vector2 v17 = new Vector2(v16.X, v10.Y);
            Vector2 v18 = new Vector2(v13.X, v13.Y + l / 16);
            Vector2 v19 = new Vector2(v18.X + l / 1.16, v18.Y);
            //
            Vector2 v20 = new Vector2(v18.X + l / 20, v18.Y + l / 3);
            Vector2 v21 = new Vector2(v4.X, v20.Y);
            //旋转三角刀片
            Vector2 v22 = new Vector2(v1.X + h * 2, v1.Y - h / 2.2);
            //切削面
            Vector2 v23 = new Vector2(v22.X - h / 14, v22.Y - fai / 2);
            Vector2 v24 = new Vector2(v22.X - fai / 1.76, v22.Y + h / 6.9);
            //切线you
            Vector2 v25 = new Vector2(v22.X + fai / 2, v22.Y);
            Vector2 v26 = new Vector2(v25.X, v25.Y + h / 2 - ch * 2);
            //
            Vector2 v27 = new Vector2(v26.X, v26.Y + ch * 2);
            Vector2 v28 = new Vector2(v26.X - cl / 2, v26.Y);
            //zuo
            Vector2 v29 = new Vector2(v27.X - cl * 2.7, v26.Y);
            Vector2 v30 = new Vector2(v29.X - (cl * 2.74) * 1.86, v29.Y - ch * 4.06);
            //切线右尺口
            Vector2 v31 = new Vector2(v28.X - cl / 3.2, v28.Y + ch / 1.3);
            Vector2 v32 = new Vector2(v31.X - (cl - cl / 3.2 - cl / 2) * 3, v31.Y);
            Vector2 v33 = new Vector2(v32.X - cl / 3.2, v28.Y);
            //上侧横线
            Vector2 v34 = new Vector2(v25.X, v25.Y + h / 2 - ch * 4.2);
            Vector2 v35 = new Vector2(v34.X - fai / 1.2, v34.Y);
            //下部分端口
            Vector2 v36 = new Vector2(v25.X, v25.Y - h / 2 + ch * 5.2);
            Vector2 v37 = new Vector2(v36.X, v36.Y - ch * 5.2);
            //下端斜线
            Vector2 v38 = new Vector2(v32.X, v37.Y + ch);
            Vector2 v39 = new Vector2(v38.X - (cl * 2.74) * 2.2, v38.Y + ch * 4.8);
            //下端尺口
            Vector2 v40 = new Vector2(v38.X + (cl / 2.6) * Math.Sin(epsr), v38.Y + cl / 2 * Math.Sin(epsr));
            Vector2 v41 = new Vector2(v40.X + ch * 1.1, v40.Y + cl / 3.2);
            Vector2 v42 = new Vector2(v41.X, v41.Y + (cl - cl / 3.2 - cl / 2) * 3);
            Vector2 v43 = new Vector2(v40.X + cl / 3.6, v42.Y + cl / 3.2);
            //
            Vector2 v44 = new Vector2(v38.X - cl * 1.2, v38.Y + cl / 1.4);
            Vector2 v45 = new Vector2(v25.X, v25.Y + cl * 1.2);
            //
            Vector2 v46 = new Vector2(v30.X - ch * 2.08, v30.Y - ch * 1.28);
            Vector2 v47 = new Vector2(v39.X - ch * 2.6, v39.Y + ch * 1.6);
            //
            Vector2 v48 = new Vector2(v30.X + (cl / 2.6) * Math.Sin(epsr), v30.Y - cl / 2 * Math.Sin(epsr));
            Vector2 v49 = new Vector2(v48.X - cl / 4, v48.Y - ch * 1.7);
            Vector2 v50 = new Vector2(v49.X + (cl - cl / 3.2 - cl / 2) * 3, v49.Y - (cl - cl / 3.2 - cl / 2) * 3 / 2);
            Vector2 v51 = new Vector2(v50.X + cl / 2.6, v50.Y + cl / 2.3);
            //
            Vector2 v52 = new Vector2(v38.X - (cl * 2.74) * 1.7, v38.Y + ch * 3.6);
            //线段
            //主视图
            //Vector2[] Line1 = { v1, v2 };
            //fun.drawBLine(dxf, Line1, 0.15, contour);
            //Vector2[] Line2 = { v4, v2 };
            //fun.drawBLine(dxf, Line2, 0.15, contour);
            //Vector2[] Line3 = { v1, v3 };
            //fun.drawBLine(dxf, Line3, 0.15, contour);
            //Vector2[] Line4 = { v4, v3 };
            //fun.drawBLine(dxf, Line4, 0.15, contour);
            //Vector2[] Line5 = { v5, v3 };
            //fun.drawBLine(dxf, Line5, 0.15, contour);
            //LwPolyline Arc1 = new LwPolyline();
            //Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            //Arc1.Vertexes.Add(new LwPolylineVertex(v6));
            //Arc1.Vertexes[0].Bulge = -l / 10;
            //fun.PolyFill(dxf, Arc1, 0.15, contour);
            //Vector2[] Line6 = { v6, v7 };
            //fun.drawBLine(dxf, Line6, 0.15, contour);
            //Vector2[] Line7 = { v8, v7 };
            //fun.drawBLine(dxf, Line7, 0.15, contour);
            //Vector2[] Line8 = { v8, v9 };
            //fun.drawBLine(dxf, Line8, 0.15, contour);
            //Vector2[] Line9 = { v8, v10 };
            //fun.drawBLine(dxf, Line9, 0.15, contour);
            //Vector2[] Line10 = { v4, v11 };
            //fun.drawBLine(dxf, Line10, 0.15, contour);
            //Vector2[] Line11 = { v10, v11 };
            //fun.drawBLine(dxf, Line11, 0.15, contour);
            //Vector2[] Line12 = { v10, v13 };
            //fun.drawBLine(dxf, Line12, 0.15, contour);
            //Vector2[] Line13 = { v9, v13 };
            //fun.drawBLine(dxf, Line13, 0.15, contour);
            //Vector2[] Line14 = { v14, v13 };
            //fun.drawBLine(dxf, Line14, 0.15, contour);
            //Vector2[] Line15 = { v15, v11 };
            //fun.drawBLine(dxf, Line15, 0.15, contour);
            //Vector2[] Line16 = { v15, v16 };
            //fun.drawBLine(dxf, Line16, 0.15, contour);
            //Vector2[] Line17 = { v17, v16 };
            //fun.drawBLine(dxf, Line17, 0.15, contour);
            //Vector2[] Line18 = { v19, v18 };
            //fun.drawBLine(dxf, Line18, 0.15, contour);
            //Vector2[] Line19 = { v20, v21 };
            //fun.drawBLine(dxf, Line19, 0.15, contour);
            //内切削面
            Vector2[] Line20 = { v23, v24 };
            fun.drawBLine(dxf, Line20, 0.5, contour);
            //切线
            Vector2[] Line21 = { v25, v26 };
            fun.drawBLine(dxf, Line21, 0.5, contour);
            //切上
            //Vector2[] Line22 = { v27, v26 };
            //fun.drawBLine(dxf, Line22, 0.08, skdimensioning);
            Vector2[] Line23 = { v26, v28 };
            fun.drawBLine(dxf, Line23, 0.5, contour);
            //zou
            //Vector2[] Line24 = { v27, v29 };
            //fun.drawBLine(dxf, Line24, 0.08, skdimensioning);
            Vector2[] Line25 = { v29, v30 };
            fun.drawBLine(dxf, Line25, 0.5, contour);
            //右尺口
            Vector2[] Line26 = { v28, v31 };
            fun.drawBLine(dxf, Line26, 0.5, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v32));
            Arc2.Vertexes.Add(new LwPolylineVertex(v31));
            Arc2.Vertexes[0].Bulge = -r * 4.6;
            fun.PolyFill(dxf, Arc2, 0.5, contour);
            Vector2[] Line27 = { v33, v32 };
            fun.drawBLine(dxf, Line27, 0.5, contour);
            Vector2[] Line28 = { v33, v29 };
            fun.drawBLine(dxf, Line28, 0.5, contour);
            Vector2[] Line29 = { v34, v35 };
            fun.drawBLine(dxf, Line29, 0.5, contour);
            //下半部分
            Vector2[] Line30 = { v25, v36 };
            fun.drawBLine(dxf, Line30, 0.5, contour);
            //Vector2[] Line31 = { v37, v36 };
            //fun.drawBLine(dxf, Line31, 0.08, skdimensioning);
            //下端斜线
            //Vector2[] Line32 = { v37, v38 };
            //fun.drawBLine(dxf, Line32, 0.08, skdimensioning);
            //Vector2[] Line33 = { v38, v39 };
            //fun.drawBLine(dxf, Line33, 0.15, contour);
            //下端尺口
            Vector2[] Line34 = { v38, v40 };
            fun.drawBLine(dxf, Line34, 0.5, contour);
            Vector2[] Line35 = { v41, v40 };
            fun.drawBLine(dxf, Line35, 0.5, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v42));
            Arc3.Vertexes.Add(new LwPolylineVertex(v41));
            Arc3.Vertexes[0].Bulge = -r * 4.6;
            fun.PolyFill(dxf, Arc3, 0.5, contour);
            Vector2[] Line36 = { v43, v42 };
            fun.drawBLine(dxf, Line36, 0.5, contour);
            Vector2[] Line37 = { v43, v36 };
            fun.drawBLine(dxf, Line37, 0.5, contour);
            //
            Vector2[] Line38 = { v44, v45 };
            fun.drawBLine(dxf, Line38, 0.5, contour);
            //
            //Vector2[] Line39 = { v30, v46 };
            //fun.drawBLine(dxf, Line39, 0.08, skdimensioning);
            //Vector2[] Line40 = { v39, v47 };
            //fun.drawBLine(dxf, Line40, 0.08, skdimensioning);
            Arc arc1 = fun.DrawArc(v32, new Vector2(v32.X - 6, v32.Y + 5), v32);
            Arc arc2 = fun.DrawArc(v22, new Vector2(v22.X - 2, v22.Y - 10), v22);
            //
            Vector2[] Line41 = { v30, v48 };
            fun.drawBLine(dxf, Line41, 0.5, contour);
            Vector2[] Line42 = { v49, v48 };
            fun.drawBLine(dxf, Line42, 0.5, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v49));
            Arc4.Vertexes.Add(new LwPolylineVertex(v50));
            Arc4.Vertexes[0].Bulge = r * 4.6;
            fun.PolyFill(dxf, Arc4, 0.5, contour);
            Vector2[] Line43 = { v50, v51 };
            fun.drawBLine(dxf, Line43, 0.5, contour);
            //
            Vector2[] Line44 = { v38, v52 };
            fun.drawBLine(dxf, Line44, 0.5, contour);
            Vector2[] Line45 = { v51, v52 };
            fun.drawBLine(dxf, Line45, 0.5, contour);
            //
            //Vector2[] Line46 = { v47, v52 };
            //fun.drawBLine(dxf, Line46, 0.08, skdimensioning);
            //
            LwPolyline poly = new LwPolyline();
            poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 3)));
            poly.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, Math.PI, fai / 3)));
            poly.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 3)));
            fun.PolyFill(dxf, poly, 0.5, contour);
            LwPolyline poly1 = new LwPolyline();
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, h / 7.5)));
            poly1.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, Math.PI, h / 7.5)));
            poly1.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, h / 7.5)));
            fun.PolyFill(dxf, poly1, 0.5, contour);
            //LwPolyline poly2 = new LwPolyline();
            //poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 2)));
            //poly2.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, Math.PI, fai / 2)));
            //poly2.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 2)));
            //fun.PolyFill(dxf, poly2, 0.08, refin);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v22.X - fai / 2 - 1, v22.Y), new Vector2(v22.X + fai / 2 + 1, v22.Y) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v22.X, v22.Y + fai / 2 + 1), new Vector2(v22.X, v22.Y - fai / 2 - 1) }, centre, Linetype.Center);
            ////
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v20.X - l / 6, v20.Y + (fai / 2) * 1.1), new Vector2(v21.X + l / 25, v21.Y + (fai / 2) * 1.1) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v20.X - l / 6, v20.Y + (fai / 2) / 4), new Vector2(v21.X + l / 25, v21.Y + (fai / 2) / 4) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v20.X - l / 6, v20.Y + (fai / 2) / 1.47), new Vector2(v21.X + l / 25, v21.Y + (fai / 2) / 1.47) }, centre, Linetype.Center);
            ////
            //DimensionStyle dimensionStyle = fun.CreateDimStyle();
            //dimensionStyle.ArrowSize = 1;
            //dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.TextHeight = 0.8;
            //double offset = 6;
            //LinearDimension dim1 = new LinearDimension(new Line(v1, v2), offset, 360, dimensionStyle);
            //dim1.UserText = "3.5 ";
            //dxf.AddEntity(dim1);
            //LinearDimension dim2 = new LinearDimension(new Line(v10, v11), offset, 180, dimensionStyle);
            //dim2.UserText = "3.63 ";
            //dxf.AddEntity(dim2);
            ////
            //LinearDimension dim3 = new LinearDimension(new Line(v27, v37), offset * 2, 270, dimensionStyle);
            //dim3.UserText = "16.5 ";
            //dxf.AddEntity(dim3);
            //LinearDimension dim4 = new LinearDimension(new Line(v27, v31), offset * 1.2, 270, dimensionStyle);
            //dim4.UserText = "1.12 ";
            //dxf.AddEntity(dim4);
            //LinearDimension dim5 = new LinearDimension(new Line(v27, v31), offset * 1.2, 360, dimensionStyle);
            //dim5.UserText = "1.5 ";
            //dxf.AddEntity(dim5);
            ////
            //RadialDimension dimrad1 = new RadialDimension(arc1, -36, 1, dimensionStyle);
            //dimrad1.UserText = "R0.14";
            //dxf.AddEntity(dimrad1);
            ////
            //RadialDimension dimrad2 = new RadialDimension(arc2, 79, 1, dimensionStyle);
            //dimrad2.UserText = "Φ9.52";
            //dxf.AddEntity(dimrad2);
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint53(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double l = 3.5;
            double pi = Math.PI;
            double epsr = 45 * pi / 180;
            double l2 = 3.63;
            double h = 16.5;
            double ch = 1.12;
            double cl = 1.5;
            double r = 0.14;
            double fai = 9.52;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + l, v1.Y);
            Vector2 v3 = new Vector2(v1.X + l / 8, v1.Y - l / 4);
            Vector2 v4 = new Vector2(v2.X, v1.Y - l / 4);
            //
            Vector2 v5 = new Vector2(v3.X + l / 8, v3.Y - l / 4);
            Vector2 v6 = new Vector2(v5.X - l / 8, v5.Y - l / 2);
            Vector2 v7 = new Vector2(v1.X, v6.Y - l / 10);
            Vector2 v8 = new Vector2(v7.X, v7.Y - l / 1.6);
            Vector2 v9 = new Vector2(v8.X + l / 5, v8.Y - l / 3);
            Vector2 v10 = new Vector2(v8.X, v8.Y - l * 2);
            //
            Vector2 v11 = new Vector2(v4.X, v10.Y);
            Vector2 v12 = new Vector2(v11.X, v11.Y - l / 10);
            //底上线
            Vector2 v13 = new Vector2(v10.X + l / 8, v10.Y + l / 3);
            //
            Vector2 v14 = new Vector2(v4.X, v13.Y);
            //
            Vector2 v15 = new Vector2(v11.X, v11.Y - l / 10);
            //
            Vector2 v16 = new Vector2(v15.X - l / 1.2, v15.Y);
            //
            Vector2 v17 = new Vector2(v16.X, v10.Y);
            Vector2 v18 = new Vector2(v13.X, v13.Y + l / 16);
            Vector2 v19 = new Vector2(v18.X + l / 1.16, v18.Y);
            //
            Vector2 v20 = new Vector2(v18.X + l / 20, v18.Y + l / 3);
            Vector2 v21 = new Vector2(v4.X, v20.Y);
            //旋转三角刀片
            Vector2 v22 = new Vector2(v1.X + h * 2, v1.Y - h / 2.2);
            //切削面
            Vector2 v23 = new Vector2(v22.X - h / 14, v22.Y - fai / 2);
            Vector2 v24 = new Vector2(v22.X - fai / 1.76, v22.Y + h / 6.9);
            //切线you
            Vector2 v25 = new Vector2(v22.X + fai / 2, v22.Y);
            Vector2 v26 = new Vector2(v25.X, v25.Y + h / 2 - ch * 2);
            //
            Vector2 v27 = new Vector2(v26.X, v26.Y + ch * 2);
            Vector2 v28 = new Vector2(v26.X - cl / 2, v26.Y);
            //zuo
            Vector2 v29 = new Vector2(v27.X - cl * 2.7, v26.Y);
            Vector2 v30 = new Vector2(v29.X - (cl * 2.74) * 1.86, v29.Y - ch * 4.06);
            //切线右尺口
            Vector2 v31 = new Vector2(v28.X - cl / 3.2, v28.Y + ch / 1.3);
            Vector2 v32 = new Vector2(v31.X - (cl - cl / 3.2 - cl / 2) * 3, v31.Y);
            Vector2 v33 = new Vector2(v32.X - cl / 3.2, v28.Y);
            //上侧横线
            Vector2 v34 = new Vector2(v25.X, v25.Y + h / 2 - ch * 4.2);
            Vector2 v35 = new Vector2(v34.X - fai / 1.2, v34.Y);
            //下部分端口
            Vector2 v36 = new Vector2(v25.X, v25.Y - h / 2 + ch * 5.2);
            Vector2 v37 = new Vector2(v36.X, v36.Y - ch * 5.2);
            //下端斜线
            Vector2 v38 = new Vector2(v32.X, v37.Y + ch);
            Vector2 v39 = new Vector2(v38.X - (cl * 2.74) * 2.2, v38.Y + ch * 4.8);
            //下端尺口
            Vector2 v40 = new Vector2(v38.X + (cl / 2.6) * Math.Sin(epsr), v38.Y + cl / 2 * Math.Sin(epsr));
            Vector2 v41 = new Vector2(v40.X + ch * 1.1, v40.Y + cl / 3.2);
            Vector2 v42 = new Vector2(v41.X, v41.Y + (cl - cl / 3.2 - cl / 2) * 3);
            Vector2 v43 = new Vector2(v40.X + cl / 3.6, v42.Y + cl / 3.2);
            //
            Vector2 v44 = new Vector2(v38.X - cl * 1.2, v38.Y + cl / 1.4);
            Vector2 v45 = new Vector2(v25.X, v25.Y + cl * 1.2);
            //
            Vector2 v46 = new Vector2(v30.X - ch * 2.08, v30.Y - ch * 1.28);
            Vector2 v47 = new Vector2(v39.X - ch * 2.6, v39.Y + ch * 1.6);
            //
            Vector2 v48 = new Vector2(v30.X + (cl / 2.6) * Math.Sin(epsr), v30.Y - cl / 2 * Math.Sin(epsr));
            Vector2 v49 = new Vector2(v48.X - cl / 4, v48.Y - ch * 1.7);
            Vector2 v50 = new Vector2(v49.X + (cl - cl / 3.2 - cl / 2) * 3, v49.Y - (cl - cl / 3.2 - cl / 2) * 3 / 2);
            Vector2 v51 = new Vector2(v50.X + cl / 2.6, v50.Y + cl / 2.3);
            //
            Vector2 v52 = new Vector2(v38.X - (cl * 2.74) * 1.7, v38.Y + ch * 3.6);
            //线段
            //主视图
            //Vector2[] Line1 = { v1, v2 };
            //fun.drawBLine(dxf, Line1, 0.15, contour);
            //Vector2[] Line2 = { v4, v2 };
            //fun.drawBLine(dxf, Line2, 0.15, contour);
            //Vector2[] Line3 = { v1, v3 };
            //fun.drawBLine(dxf, Line3, 0.15, contour);
            //Vector2[] Line4 = { v4, v3 };
            //fun.drawBLine(dxf, Line4, 0.15, contour);
            //Vector2[] Line5 = { v5, v3 };
            //fun.drawBLine(dxf, Line5, 0.15, contour);
            //LwPolyline Arc1 = new LwPolyline();
            //Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            //Arc1.Vertexes.Add(new LwPolylineVertex(v6));
            //Arc1.Vertexes[0].Bulge = -l / 10;
            //fun.PolyFill(dxf, Arc1, 0.15, contour);
            //Vector2[] Line6 = { v6, v7 };
            //fun.drawBLine(dxf, Line6, 0.15, contour);
            //Vector2[] Line7 = { v8, v7 };
            //fun.drawBLine(dxf, Line7, 0.15, contour);
            //Vector2[] Line8 = { v8, v9 };
            //fun.drawBLine(dxf, Line8, 0.15, contour);
            //Vector2[] Line9 = { v8, v10 };
            //fun.drawBLine(dxf, Line9, 0.15, contour);
            //Vector2[] Line10 = { v4, v11 };
            //fun.drawBLine(dxf, Line10, 0.15, contour);
            //Vector2[] Line11 = { v10, v11 };
            //fun.drawBLine(dxf, Line11, 0.15, contour);
            //Vector2[] Line12 = { v10, v13 };
            //fun.drawBLine(dxf, Line12, 0.15, contour);
            //Vector2[] Line13 = { v9, v13 };
            //fun.drawBLine(dxf, Line13, 0.15, contour);
            //Vector2[] Line14 = { v14, v13 };
            //fun.drawBLine(dxf, Line14, 0.15, contour);
            //Vector2[] Line15 = { v15, v11 };
            //fun.drawBLine(dxf, Line15, 0.15, contour);
            //Vector2[] Line16 = { v15, v16 };
            //fun.drawBLine(dxf, Line16, 0.15, contour);
            //Vector2[] Line17 = { v17, v16 };
            //fun.drawBLine(dxf, Line17, 0.15, contour);
            //Vector2[] Line18 = { v19, v18 };
            //fun.drawBLine(dxf, Line18, 0.15, contour);
            //Vector2[] Line19 = { v20, v21 };
            //fun.drawBLine(dxf, Line19, 0.15, contour);
            ////内切削面
            //Vector2[] Line20 = { v23, v24 };
            //fun.drawBLine(dxf, Line20, 0.15, contour);
            ////切线
            //Vector2[] Line21 = { v25, v26 };
            //fun.drawBLine(dxf, Line21, 0.15, contour);
            ////切上
            //Vector2[] Line22 = { v27, v26 };
            //fun.drawBLine(dxf, Line22, 0.08, skdimensioning);
            //Vector2[] Line23 = { v26, v28 };
            //fun.drawBLine(dxf, Line23, 0.15, contour);
            ////zou
            //Vector2[] Line24 = { v27, v29 };
            //fun.drawBLine(dxf, Line24, 0.08, skdimensioning);
            //Vector2[] Line25 = { v29, v30 };
            //fun.drawBLine(dxf, Line25, 0.15, contour);
            ////右尺口
            //Vector2[] Line26 = { v28, v31 };
            //fun.drawBLine(dxf, Line26, 0.15, contour);
            //LwPolyline Arc2 = new LwPolyline();
            //Arc2.Vertexes.Add(new LwPolylineVertex(v32));
            //Arc2.Vertexes.Add(new LwPolylineVertex(v31));
            //Arc2.Vertexes[0].Bulge = -r * 4.6;
            //fun.PolyFill(dxf, Arc2, 0.15, contour);
            //Vector2[] Line27 = { v33, v32 };
            //fun.drawBLine(dxf, Line27, 0.15, contour);
            //Vector2[] Line28 = { v33, v29 };
            //fun.drawBLine(dxf, Line28, 0.15, contour);
            //Vector2[] Line29 = { v34, v35 };
            //fun.drawBLine(dxf, Line29, 0.15, contour);
            ////下半部分
            //Vector2[] Line30 = { v25, v36 };
            //fun.drawBLine(dxf, Line30, 0.15, contour);
            //Vector2[] Line31 = { v37, v36 };
            //fun.drawBLine(dxf, Line31, 0.08, skdimensioning);
            ////下端斜线
            //Vector2[] Line32 = { v37, v38 };
            //fun.drawBLine(dxf, Line32, 0.08, skdimensioning);
            ////Vector2[] Line33 = { v38, v39 };
            ////fun.drawBLine(dxf, Line33, 0.15, contour);
            ////下端尺口
            //Vector2[] Line34 = { v38, v40 };
            //fun.drawBLine(dxf, Line34, 0.15, contour);
            //Vector2[] Line35 = { v41, v40 };
            //fun.drawBLine(dxf, Line35, 0.15, contour);
            //LwPolyline Arc3 = new LwPolyline();
            //Arc3.Vertexes.Add(new LwPolylineVertex(v42));
            //Arc3.Vertexes.Add(new LwPolylineVertex(v41));
            //Arc3.Vertexes[0].Bulge = -r * 4.6;
            //fun.PolyFill(dxf, Arc3, 0.15, contour);
            //Vector2[] Line36 = { v43, v42 };
            //fun.drawBLine(dxf, Line36, 0.15, contour);
            //Vector2[] Line37 = { v43, v36 };
            //fun.drawBLine(dxf, Line37, 0.15, contour);
            ////
            //Vector2[] Line38 = { v44, v45 };
            //fun.drawBLine(dxf, Line38, 0.15, contour);
            ////
            //Vector2[] Line39 = { v30, v46 };
            //fun.drawBLine(dxf, Line39, 0.08, skdimensioning);
            //Vector2[] Line40 = { v39, v47 };
            //fun.drawBLine(dxf, Line40, 0.08, skdimensioning);
            Arc arc1 = fun.DrawArc(v32, new Vector2(v32.X - 6, v32.Y + 5), v32);
            Arc arc2 = fun.DrawArc(v22, new Vector2(v22.X - 2, v22.Y - 10), v22);
            ////
            //Vector2[] Line41 = { v30, v48 };
            //fun.drawBLine(dxf, Line41, 0.15, contour);
            //Vector2[] Line42 = { v49, v48 };
            //fun.drawBLine(dxf, Line42, 0.15, contour);
            //LwPolyline Arc4 = new LwPolyline();
            //Arc4.Vertexes.Add(new LwPolylineVertex(v49));
            //Arc4.Vertexes.Add(new LwPolylineVertex(v50));
            //Arc4.Vertexes[0].Bulge = r * 4.6;
            //fun.PolyFill(dxf, Arc4, 0.15, contour);
            //Vector2[] Line43 = { v50, v51 };
            //fun.drawBLine(dxf, Line43, 0.15, contour);
            ////
            //Vector2[] Line44 = { v38, v52 };
            //fun.drawBLine(dxf, Line44, 0.15, contour);
            //Vector2[] Line45 = { v51, v52 };
            //fun.drawBLine(dxf, Line45, 0.15, contour);
            ////
            //Vector2[] Line46 = { v47, v52 };
            //fun.drawBLine(dxf, Line46, 0.08, skdimensioning);
            ////
            //LwPolyline poly = new LwPolyline();
            //poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 3)));
            //poly.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, Math.PI, fai / 3)));
            //poly.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 3)));
            //fun.PolyFill(dxf, poly, 0.15, contour);
            //LwPolyline poly1 = new LwPolyline();
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, h / 7.5)));
            //poly1.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, Math.PI, h / 7.5)));
            //poly1.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, h / 7.5)));
            //fun.PolyFill(dxf, poly1, 0.15, contour);
            //LwPolyline poly2 = new LwPolyline();
            //poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 2)));
            //poly2.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, Math.PI, fai / 2)));
            //poly2.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 2)));
            //fun.PolyFill(dxf, poly2, 0.08, refin);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v22.X - fai / 2 - 1, v22.Y), new Vector2(v22.X + fai / 2 + 1, v22.Y) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v22.X, v22.Y + fai / 2 + 1), new Vector2(v22.X, v22.Y - fai / 2 - 1) }, centre, Linetype.Center);
            ////
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v20.X - l / 6, v20.Y + (fai / 2) * 1.1), new Vector2(v21.X + l / 25, v21.Y + (fai / 2) * 1.1) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v20.X - l / 6, v20.Y + (fai / 2) / 4), new Vector2(v21.X + l / 25, v21.Y + (fai / 2) / 4) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v20.X - l / 6, v20.Y + (fai / 2) / 1.47), new Vector2(v21.X + l / 25, v21.Y + (fai / 2) / 1.47) }, centre, Linetype.Center);
            ////
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 1;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 0.8;
            double offset = 6;
            //LinearDimension dim1 = new LinearDimension(new Line(v1, v2), offset, 360, dimensionStyle);
            //dim1.UserText = "3.5 ";
            //dxf.AddEntity(dim1);
            //LinearDimension dim2 = new LinearDimension(new Line(v10, v11), offset, 180, dimensionStyle);
            //dim2.UserText = "3.63 ";
            //dxf.AddEntity(dim2);
            //
            LinearDimension dim3 = new LinearDimension(new Line(v27, v37), offset * 2, 270, dimensionStyle);
            dim3.UserText = "16.5 ";
            dxf.AddEntity(dim3);
            LinearDimension dim4 = new LinearDimension(new Line(v27, v31), offset * 1.2, 270, dimensionStyle);
            dim4.UserText = "1.12 ";
            dxf.AddEntity(dim4);
            LinearDimension dim5 = new LinearDimension(new Line(v27, v31), offset * 1.2, 360, dimensionStyle);
            dim5.UserText = "1.5 ";
            dxf.AddEntity(dim5);
            //
            RadialDimension dimrad1 = new RadialDimension(arc1, -36, 1, dimensionStyle);
            dimrad1.UserText = "R0.14";
            dxf.AddEntity(dimrad1);
            //
            RadialDimension dimrad2 = new RadialDimension(arc2, 79, 1, dimensionStyle);
            dimrad2.UserText = "Φ9.52";
            dxf.AddEntity(dimrad2);
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint54(Dictionary<string, Object> data)   //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double l = 3.5;
            double pi = Math.PI;
            double epsr = 45 * pi / 180;
            double l2 = 3.63;
            double h = 16.5;
            double ch = 1.12;
            double cl = 1.5;
            double r = 0.14;
            double fai = 9.52;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + l, v1.Y);
            Vector2 v3 = new Vector2(v1.X + l / 8, v1.Y - l / 4);
            Vector2 v4 = new Vector2(v2.X, v1.Y - l / 4);
            //
            Vector2 v5 = new Vector2(v3.X + l / 8, v3.Y - l / 4);
            Vector2 v6 = new Vector2(v5.X - l / 8, v5.Y - l / 2);
            Vector2 v7 = new Vector2(v1.X, v6.Y - l / 10);
            Vector2 v8 = new Vector2(v7.X, v7.Y - l / 1.6);
            Vector2 v9 = new Vector2(v8.X + l / 5, v8.Y - l / 3);
            Vector2 v10 = new Vector2(v8.X, v8.Y - l * 2);
            //
            Vector2 v11 = new Vector2(v4.X, v10.Y);
            Vector2 v12 = new Vector2(v11.X, v11.Y - l / 10);
            //底上线
            Vector2 v13 = new Vector2(v10.X + l / 8, v10.Y + l / 3);
            //
            Vector2 v14 = new Vector2(v4.X, v13.Y);
            //
            Vector2 v15 = new Vector2(v11.X, v11.Y - l / 10);
            //
            Vector2 v16 = new Vector2(v15.X - l / 1.2, v15.Y);
            //
            Vector2 v17 = new Vector2(v16.X, v10.Y);
            Vector2 v18 = new Vector2(v13.X, v13.Y + l / 16);
            Vector2 v19 = new Vector2(v18.X + l / 1.16, v18.Y);
            //
            Vector2 v20 = new Vector2(v18.X + l / 20, v18.Y + l / 3);
            Vector2 v21 = new Vector2(v4.X, v20.Y);
            //旋转三角刀片
            Vector2 v22 = new Vector2(v1.X + h * 2, v1.Y - h / 2.2);
            //切削面
            Vector2 v23 = new Vector2(v22.X - h / 14, v22.Y - fai / 2);
            Vector2 v24 = new Vector2(v22.X - fai / 1.76, v22.Y + h / 6.9);
            //切线you
            Vector2 v25 = new Vector2(v22.X + fai / 2, v22.Y);
            Vector2 v26 = new Vector2(v25.X, v25.Y + h / 2 - ch * 2);
            //
            Vector2 v27 = new Vector2(v26.X, v26.Y + ch * 2);
            Vector2 v28 = new Vector2(v26.X - cl / 2, v26.Y);
            //zuo
            Vector2 v29 = new Vector2(v27.X - cl * 2.7, v26.Y);
            Vector2 v30 = new Vector2(v29.X - (cl * 2.74) * 1.86, v29.Y - ch * 4.06);
            //切线右尺口
            Vector2 v31 = new Vector2(v28.X - cl / 3.2, v28.Y + ch / 1.3);
            Vector2 v32 = new Vector2(v31.X - (cl - cl / 3.2 - cl / 2) * 3, v31.Y);
            Vector2 v33 = new Vector2(v32.X - cl / 3.2, v28.Y);
            //上侧横线
            Vector2 v34 = new Vector2(v25.X, v25.Y + h / 2 - ch * 4.2);
            Vector2 v35 = new Vector2(v34.X - fai / 1.2, v34.Y);
            //下部分端口
            Vector2 v36 = new Vector2(v25.X, v25.Y - h / 2 + ch * 5.2);
            Vector2 v37 = new Vector2(v36.X, v36.Y - ch * 5.2);
            //下端斜线
            Vector2 v38 = new Vector2(v32.X, v37.Y + ch);
            Vector2 v39 = new Vector2(v38.X - (cl * 2.74) * 2.2, v38.Y + ch * 4.8);
            //下端尺口
            Vector2 v40 = new Vector2(v38.X + (cl / 2.6) * Math.Sin(epsr), v38.Y + cl / 2 * Math.Sin(epsr));
            Vector2 v41 = new Vector2(v40.X + ch * 1.1, v40.Y + cl / 3.2);
            Vector2 v42 = new Vector2(v41.X, v41.Y + (cl - cl / 3.2 - cl / 2) * 3);
            Vector2 v43 = new Vector2(v40.X + cl / 3.6, v42.Y + cl / 3.2);
            //
            Vector2 v44 = new Vector2(v38.X - cl * 1.2, v38.Y + cl / 1.4);
            Vector2 v45 = new Vector2(v25.X, v25.Y + cl * 1.2);
            //
            Vector2 v46 = new Vector2(v30.X - ch * 2.08, v30.Y - ch * 1.28);
            Vector2 v47 = new Vector2(v39.X - ch * 2.6, v39.Y + ch * 1.6);
            //
            Vector2 v48 = new Vector2(v30.X + (cl / 2.6) * Math.Sin(epsr), v30.Y - cl / 2 * Math.Sin(epsr));
            Vector2 v49 = new Vector2(v48.X - cl / 4, v48.Y - ch * 1.7);
            Vector2 v50 = new Vector2(v49.X + (cl - cl / 3.2 - cl / 2) * 3, v49.Y - (cl - cl / 3.2 - cl / 2) * 3 / 2);
            Vector2 v51 = new Vector2(v50.X + cl / 2.6, v50.Y + cl / 2.3);
            //
            Vector2 v52 = new Vector2(v38.X - (cl * 2.74) * 1.7, v38.Y + ch * 3.6);
            //线段
            //主视图
            //Vector2[] Line1 = { v1, v2 };
            //fun.drawBLine(dxf, Line1, 0.15, contour);
            //Vector2[] Line2 = { v4, v2 };
            //fun.drawBLine(dxf, Line2, 0.15, contour);
            //Vector2[] Line3 = { v1, v3 };
            //fun.drawBLine(dxf, Line3, 0.15, contour);
            //Vector2[] Line4 = { v4, v3 };
            //fun.drawBLine(dxf, Line4, 0.15, contour);
            //Vector2[] Line5 = { v5, v3 };
            //fun.drawBLine(dxf, Line5, 0.15, contour);
            //LwPolyline Arc1 = new LwPolyline();
            //Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            //Arc1.Vertexes.Add(new LwPolylineVertex(v6));
            //Arc1.Vertexes[0].Bulge = -l / 10;
            //fun.PolyFill(dxf, Arc1, 0.15, contour);
            //Vector2[] Line6 = { v6, v7 };
            //fun.drawBLine(dxf, Line6, 0.15, contour);
            //Vector2[] Line7 = { v8, v7 };
            //fun.drawBLine(dxf, Line7, 0.15, contour);
            //Vector2[] Line8 = { v8, v9 };
            //fun.drawBLine(dxf, Line8, 0.15, contour);
            //Vector2[] Line9 = { v8, v10 };
            //fun.drawBLine(dxf, Line9, 0.15, contour);
            //Vector2[] Line10 = { v4, v11 };
            //fun.drawBLine(dxf, Line10, 0.15, contour);
            //Vector2[] Line11 = { v10, v11 };
            //fun.drawBLine(dxf, Line11, 0.15, contour);
            //Vector2[] Line12 = { v10, v13 };
            //fun.drawBLine(dxf, Line12, 0.15, contour);
            //Vector2[] Line13 = { v9, v13 };
            //fun.drawBLine(dxf, Line13, 0.15, contour);
            //Vector2[] Line14 = { v14, v13 };
            //fun.drawBLine(dxf, Line14, 0.15, contour);
            //Vector2[] Line15 = { v15, v11 };
            //fun.drawBLine(dxf, Line15, 0.15, contour);
            //Vector2[] Line16 = { v15, v16 };
            //fun.drawBLine(dxf, Line16, 0.15, contour);
            //Vector2[] Line17 = { v17, v16 };
            //fun.drawBLine(dxf, Line17, 0.15, contour);
            //Vector2[] Line18 = { v19, v18 };
            //fun.drawBLine(dxf, Line18, 0.15, contour);
            //Vector2[] Line19 = { v20, v21 };
            //fun.drawBLine(dxf, Line19, 0.15, contour);
            ////内切削面
            //Vector2[] Line20 = { v23, v24 };
            //fun.drawBLine(dxf, Line20, 0.15, contour);
            ////切线
            //Vector2[] Line21 = { v25, v26 };
            //fun.drawBLine(dxf, Line21, 0.15, contour);
            //切上
            Vector2[] Line22 = { v27, v26 };
            fun.drawBLine(dxf, Line22, 0.08, skdimensioning);
            //Vector2[] Line23 = { v26, v28 };
            //fun.drawBLine(dxf, Line23, 0.15, contour);
            //zou
            Vector2[] Line24 = { v27, v29 };
            fun.drawBLine(dxf, Line24, 0.08, skdimensioning);
            //Vector2[] Line25 = { v29, v30 };
            //fun.drawBLine(dxf, Line25, 0.15, contour);
            ////右尺口
            //Vector2[] Line26 = { v28, v31 };
            //fun.drawBLine(dxf, Line26, 0.15, contour);
            //LwPolyline Arc2 = new LwPolyline();
            //Arc2.Vertexes.Add(new LwPolylineVertex(v32));
            //Arc2.Vertexes.Add(new LwPolylineVertex(v31));
            //Arc2.Vertexes[0].Bulge = -r * 4.6;
            //fun.PolyFill(dxf, Arc2, 0.15, contour);
            //Vector2[] Line27 = { v33, v32 };
            //fun.drawBLine(dxf, Line27, 0.15, contour);
            //Vector2[] Line28 = { v33, v29 };
            //fun.drawBLine(dxf, Line28, 0.15, contour);
            //Vector2[] Line29 = { v34, v35 };
            //fun.drawBLine(dxf, Line29, 0.15, contour);
            ////下半部分
            //Vector2[] Line30 = { v25, v36 };
            //fun.drawBLine(dxf, Line30, 0.15, contour);
            Vector2[] Line31 = { v37, v36 };
            fun.drawBLine(dxf, Line31, 0.25, skdimensioning);
            //下端斜线
            Vector2[] Line32 = { v37, v38 };
            fun.drawBLine(dxf, Line32, 0.25, skdimensioning);
            //Vector2[] Line33 = { v38, v39 };
            //fun.drawBLine(dxf, Line33, 0.15, contour);
            //下端尺口
            //Vector2[] Line34 = { v38, v40 };
            //fun.drawBLine(dxf, Line34, 0.15, contour);
            //Vector2[] Line35 = { v41, v40 };
            //fun.drawBLine(dxf, Line35, 0.15, contour);
            //LwPolyline Arc3 = new LwPolyline();
            //Arc3.Vertexes.Add(new LwPolylineVertex(v42));
            //Arc3.Vertexes.Add(new LwPolylineVertex(v41));
            //Arc3.Vertexes[0].Bulge = -r * 4.6;
            //fun.PolyFill(dxf, Arc3, 0.15, contour);
            //Vector2[] Line36 = { v43, v42 };
            //fun.drawBLine(dxf, Line36, 0.15, contour);
            //Vector2[] Line37 = { v43, v36 };
            //fun.drawBLine(dxf, Line37, 0.15, contour);
            ////
            //Vector2[] Line38 = { v44, v45 };
            //fun.drawBLine(dxf, Line38, 0.15, contour);
            //
            Vector2[] Line39 = { v30, v46 };
            fun.drawBLine(dxf, Line39, 0.25, skdimensioning);
            Vector2[] Line40 = { v39, v47 };
            fun.drawBLine(dxf, Line40, 0.25, skdimensioning);
            //Arc arc1 = fun.DrawArc(v32, new Vector2(v32.X - 6, v32.Y + 5), v32);
            //Arc arc2 = fun.DrawArc(v22, new Vector2(v22.X - 2, v22.Y - 10), v22);
            ////
            //Vector2[] Line41 = { v30, v48 };
            //fun.drawBLine(dxf, Line41, 0.15, contour);
            //Vector2[] Line42 = { v49, v48 };
            //fun.drawBLine(dxf, Line42, 0.15, contour);
            //LwPolyline Arc4 = new LwPolyline();
            //Arc4.Vertexes.Add(new LwPolylineVertex(v49));
            //Arc4.Vertexes.Add(new LwPolylineVertex(v50));
            //Arc4.Vertexes[0].Bulge = r * 4.6;
            //fun.PolyFill(dxf, Arc4, 0.15, contour);
            //Vector2[] Line43 = { v50, v51 };
            //fun.drawBLine(dxf, Line43, 0.15, contour);
            //
            //Vector2[] Line44 = { v38, v52 };
            //fun.drawBLine(dxf, Line44, 0.15, contour);
            //Vector2[] Line45 = { v51, v52 };
            //fun.drawBLine(dxf, Line45, 0.15, contour);
            //
            Vector2[] Line46 = { v47, v52 };
            fun.drawBLine(dxf, Line46, 0.25, skdimensioning);
            //
            //LwPolyline poly = new LwPolyline();
            //poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 3)));
            //poly.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, Math.PI, fai / 3)));
            //poly.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 3)));
            //fun.PolyFill(dxf, poly, 0.15, contour);
            //LwPolyline poly1 = new LwPolyline();
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, h / 7.5)));
            //poly1.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, Math.PI, h / 7.5)));
            //poly1.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, h / 7.5)));
            //fun.PolyFill(dxf, poly1, 0.15, contour);
            //LwPolyline poly2 = new LwPolyline();
            //poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 2)));
            //poly2.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, Math.PI, fai / 2)));
            //poly2.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 2)));
            //fun.PolyFill(dxf, poly2, 0.08, refin);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v22.X - fai / 2 - 1, v22.Y), new Vector2(v22.X + fai / 2 + 1, v22.Y) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v22.X, v22.Y + fai / 2 + 1), new Vector2(v22.X, v22.Y - fai / 2 - 1) }, centre, Linetype.Center);
            ////
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v20.X - l / 6, v20.Y + (fai / 2) * 1.1), new Vector2(v21.X + l / 25, v21.Y + (fai / 2) * 1.1) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v20.X - l / 6, v20.Y + (fai / 2) / 4), new Vector2(v21.X + l / 25, v21.Y + (fai / 2) / 4) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v20.X - l / 6, v20.Y + (fai / 2) / 1.47), new Vector2(v21.X + l / 25, v21.Y + (fai / 2) / 1.47) }, centre, Linetype.Center);
            ////
            //DimensionStyle dimensionStyle = fun.CreateDimStyle();
            //dimensionStyle.ArrowSize = 1;
            //dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.TextHeight = 0.8;
            //double offset = 6;
            //LinearDimension dim1 = new LinearDimension(new Line(v1, v2), offset, 360, dimensionStyle);
            //dim1.UserText = "3.5 ";
            //dxf.AddEntity(dim1);
            //LinearDimension dim2 = new LinearDimension(new Line(v10, v11), offset, 180, dimensionStyle);
            //dim2.UserText = "3.63 ";
            //dxf.AddEntity(dim2);
            ////
            //LinearDimension dim3 = new LinearDimension(new Line(v27, v37), offset * 2, 270, dimensionStyle);
            //dim3.UserText = "16.5 ";
            //dxf.AddEntity(dim3);
            //LinearDimension dim4 = new LinearDimension(new Line(v27, v31), offset * 1.2, 270, dimensionStyle);
            //dim4.UserText = "1.12 ";
            //dxf.AddEntity(dim4);
            //LinearDimension dim5 = new LinearDimension(new Line(v27, v31), offset * 1.2, 360, dimensionStyle);
            //dim5.UserText = "1.5 ";
            //dxf.AddEntity(dim5);
            ////
            //RadialDimension dimrad1 = new RadialDimension(arc1, -36, 1, dimensionStyle);
            //dimrad1.UserText = "R0.14";
            //dxf.AddEntity(dimrad1);
            ////
            //RadialDimension dimrad2 = new RadialDimension(arc2, 79, 1, dimensionStyle);
            //dimrad2.UserText = "Φ9.52";
            //dxf.AddEntity(dimrad2);
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint55(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double l = 3.5;
            double pi = Math.PI;
            double epsr = 45 * pi / 180;
            double l2 = 3.63;
            double h = 16.5;
            double ch = 1.12;
            double cl = 1.5;
            double r = 0.14;
            double fai = 9.52;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + l, v1.Y);
            Vector2 v3 = new Vector2(v1.X + l / 8, v1.Y - l / 4);
            Vector2 v4 = new Vector2(v2.X, v1.Y - l / 4);
            //
            Vector2 v5 = new Vector2(v3.X + l / 8, v3.Y - l / 4);
            Vector2 v6 = new Vector2(v5.X - l / 8, v5.Y - l / 2);
            Vector2 v7 = new Vector2(v1.X, v6.Y - l / 10);
            Vector2 v8 = new Vector2(v7.X, v7.Y - l / 1.6);
            Vector2 v9 = new Vector2(v8.X + l / 5, v8.Y - l / 3);
            Vector2 v10 = new Vector2(v8.X, v8.Y - l * 2);
            //
            Vector2 v11 = new Vector2(v4.X, v10.Y);
            Vector2 v12 = new Vector2(v11.X, v11.Y - l / 10);
            //底上线
            Vector2 v13 = new Vector2(v10.X + l / 8, v10.Y + l / 3);
            //
            Vector2 v14 = new Vector2(v4.X, v13.Y);
            //
            Vector2 v15 = new Vector2(v11.X, v11.Y - l / 10);
            //
            Vector2 v16 = new Vector2(v15.X - l / 1.2, v15.Y);
            //
            Vector2 v17 = new Vector2(v16.X, v10.Y);
            Vector2 v18 = new Vector2(v13.X, v13.Y + l / 16);
            Vector2 v19 = new Vector2(v18.X + l / 1.16, v18.Y);
            //
            Vector2 v20 = new Vector2(v18.X + l / 20, v18.Y + l / 3);
            Vector2 v21 = new Vector2(v4.X, v20.Y);
            //旋转三角刀片
            Vector2 v22 = new Vector2(v1.X + h * 2, v1.Y - h / 2.2);
            //切削面
            Vector2 v23 = new Vector2(v22.X - h / 14, v22.Y - fai / 2);
            Vector2 v24 = new Vector2(v22.X - fai / 1.76, v22.Y + h / 6.9);
            //切线you
            Vector2 v25 = new Vector2(v22.X + fai / 2, v22.Y);
            Vector2 v26 = new Vector2(v25.X, v25.Y + h / 2 - ch * 2);
            //
            Vector2 v27 = new Vector2(v26.X, v26.Y + ch * 2);
            Vector2 v28 = new Vector2(v26.X - cl / 2, v26.Y);
            //zuo
            Vector2 v29 = new Vector2(v27.X - cl * 2.7, v26.Y);
            Vector2 v30 = new Vector2(v29.X - (cl * 2.74) * 1.86, v29.Y - ch * 4.06);
            //切线右尺口
            Vector2 v31 = new Vector2(v28.X - cl / 3.2, v28.Y + ch / 1.3);
            Vector2 v32 = new Vector2(v31.X - (cl - cl / 3.2 - cl / 2) * 3, v31.Y);
            Vector2 v33 = new Vector2(v32.X - cl / 3.2, v28.Y);
            //上侧横线
            Vector2 v34 = new Vector2(v25.X, v25.Y + h / 2 - ch * 4.2);
            Vector2 v35 = new Vector2(v34.X - fai / 1.2, v34.Y);
            //下部分端口
            Vector2 v36 = new Vector2(v25.X, v25.Y - h / 2 + ch * 5.2);
            Vector2 v37 = new Vector2(v36.X, v36.Y - ch * 5.2);
            //下端斜线
            Vector2 v38 = new Vector2(v32.X, v37.Y + ch);
            Vector2 v39 = new Vector2(v38.X - (cl * 2.74) * 2.2, v38.Y + ch * 4.8);
            //下端尺口
            Vector2 v40 = new Vector2(v38.X + (cl / 2.6) * Math.Sin(epsr), v38.Y + cl / 2 * Math.Sin(epsr));
            Vector2 v41 = new Vector2(v40.X + ch * 1.1, v40.Y + cl / 3.2);
            Vector2 v42 = new Vector2(v41.X, v41.Y + (cl - cl / 3.2 - cl / 2) * 3);
            Vector2 v43 = new Vector2(v40.X + cl / 3.6, v42.Y + cl / 3.2);
            //
            Vector2 v44 = new Vector2(v38.X - cl * 1.2, v38.Y + cl / 1.4);
            Vector2 v45 = new Vector2(v25.X, v25.Y + cl * 1.2);
            //
            Vector2 v46 = new Vector2(v30.X - ch * 2.08, v30.Y - ch * 1.28);
            Vector2 v47 = new Vector2(v39.X - ch * 2.6, v39.Y + ch * 1.6);
            //
            Vector2 v48 = new Vector2(v30.X + (cl / 2.6) * Math.Sin(epsr), v30.Y - cl / 2 * Math.Sin(epsr));
            Vector2 v49 = new Vector2(v48.X - cl / 4, v48.Y - ch * 1.7);
            Vector2 v50 = new Vector2(v49.X + (cl - cl / 3.2 - cl / 2) * 3, v49.Y - (cl - cl / 3.2 - cl / 2) * 3 / 2);
            Vector2 v51 = new Vector2(v50.X + cl / 2.6, v50.Y + cl / 2.3);
            //
            Vector2 v52 = new Vector2(v38.X - (cl * 2.74) * 1.7, v38.Y + ch * 3.6);
            //线段
            //主视图
            //Vector2[] Line1 = { v1, v2 };
            //fun.drawBLine(dxf, Line1, 0.15, contour);
            //Vector2[] Line2 = { v4, v2 };
            //fun.drawBLine(dxf, Line2, 0.15, contour);
            //Vector2[] Line3 = { v1, v3 };
            //fun.drawBLine(dxf, Line3, 0.15, contour);
            //Vector2[] Line4 = { v4, v3 };
            //fun.drawBLine(dxf, Line4, 0.15, contour);
            //Vector2[] Line5 = { v5, v3 };
            //fun.drawBLine(dxf, Line5, 0.15, contour);
            //LwPolyline Arc1 = new LwPolyline();
            //Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            //Arc1.Vertexes.Add(new LwPolylineVertex(v6));
            //Arc1.Vertexes[0].Bulge = -l / 10;
            //fun.PolyFill(dxf, Arc1, 0.15, contour);
            //Vector2[] Line6 = { v6, v7 };
            //fun.drawBLine(dxf, Line6, 0.15, contour);
            //Vector2[] Line7 = { v8, v7 };
            //fun.drawBLine(dxf, Line7, 0.15, contour);
            //Vector2[] Line8 = { v8, v9 };
            //fun.drawBLine(dxf, Line8, 0.15, contour);
            //Vector2[] Line9 = { v8, v10 };
            //fun.drawBLine(dxf, Line9, 0.15, contour);
            //Vector2[] Line10 = { v4, v11 };
            //fun.drawBLine(dxf, Line10, 0.15, contour);
            //Vector2[] Line11 = { v10, v11 };
            //fun.drawBLine(dxf, Line11, 0.15, contour);
            //Vector2[] Line12 = { v10, v13 };
            //fun.drawBLine(dxf, Line12, 0.15, contour);
            //Vector2[] Line13 = { v9, v13 };
            //fun.drawBLine(dxf, Line13, 0.15, contour);
            //Vector2[] Line14 = { v14, v13 };
            //fun.drawBLine(dxf, Line14, 0.15, contour);
            //Vector2[] Line15 = { v15, v11 };
            //fun.drawBLine(dxf, Line15, 0.15, contour);
            //Vector2[] Line16 = { v15, v16 };
            //fun.drawBLine(dxf, Line16, 0.15, contour);
            //Vector2[] Line17 = { v17, v16 };
            //fun.drawBLine(dxf, Line17, 0.15, contour);
            //Vector2[] Line18 = { v19, v18 };
            //fun.drawBLine(dxf, Line18, 0.15, contour);
            //Vector2[] Line19 = { v20, v21 };
            //fun.drawBLine(dxf, Line19, 0.15, contour);
            //内切削面
            //Vector2[] Line20 = { v23, v24 };
            //fun.drawBLine(dxf, Line20, 0.15, contour);
            //切线
            Vector2[] Line21 = { v25, v26 };
            fun.drawBLine(dxf, Line21, 0.5, contour);
            //切上
            //Vector2[] Line22 = { v27, v26 };
            //fun.drawBLine(dxf, Line22, 0.08, skdimensioning);
            Vector2[] Line23 = { v26, v28 };
            fun.drawBLine(dxf, Line23, 0.5, contour);
            //zou
            //Vector2[] Line24 = { v27, v29 };
            //fun.drawBLine(dxf, Line24, 0.08, skdimensioning);
            Vector2[] Line25 = { v29, v30 };
            fun.drawBLine(dxf, Line25, 0.5, contour);
            //右尺口
            Vector2[] Line26 = { v28, v31 };
            fun.drawBLine(dxf, Line26, 0.5, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v32));
            Arc2.Vertexes.Add(new LwPolylineVertex(v31));
            Arc2.Vertexes[0].Bulge = -r * 4.6;
            fun.PolyFill(dxf, Arc2, 0.5, contour);
            Vector2[] Line27 = { v33, v32 };
            fun.drawBLine(dxf, Line27, 0.5, contour);
            Vector2[] Line28 = { v33, v29 };
            fun.drawBLine(dxf, Line28, 0.5, contour);
            //Vector2[] Line29 = { v34, v35 };
            //fun.drawBLine(dxf, Line29, 0.15, contour);
            //下半部分
            Vector2[] Line30 = { v25, v36 };
            fun.drawBLine(dxf, Line30, 0.15, contour);
            //Vector2[] Line31 = { v37, v36 };
            //fun.drawBLine(dxf, Line31, 0.08, skdimensioning);
            //下端斜线
            //Vector2[] Line32 = { v37, v38 };
            //fun.drawBLine(dxf, Line32, 0.08, skdimensioning);
            //Vector2[] Line33 = { v38, v39 };
            //fun.drawBLine(dxf, Line33, 0.15, contour);
            //下端尺口
            Vector2[] Line34 = { v38, v40 };
            fun.drawBLine(dxf, Line34, 0.5, contour);
            Vector2[] Line35 = { v41, v40 };
            fun.drawBLine(dxf, Line35, 0.5, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v42));
            Arc3.Vertexes.Add(new LwPolylineVertex(v41));
            Arc3.Vertexes[0].Bulge = -r * 4.6;
            fun.PolyFill(dxf, Arc3, 0.5, contour);
            Vector2[] Line36 = { v43, v42 };
            fun.drawBLine(dxf, Line36, 0.5, contour);
            Vector2[] Line37 = { v43, v36 };
            fun.drawBLine(dxf, Line37, 0.5, contour);
            //
            //Vector2[] Line38 = { v44, v45 };
            //fun.drawBLine(dxf, Line38, 0.15, contour);
            //
            //Vector2[] Line39 = { v30, v46 };
            //fun.drawBLine(dxf, Line39, 0.08, skdimensioning);
            //Vector2[] Line40 = { v39, v47 };
            //fun.drawBLine(dxf, Line40, 0.08, skdimensioning);
            //Arc arc1 = fun.DrawArc(v32, new Vector2(v32.X - 6, v32.Y + 5), v32);
            //Arc arc2 = fun.DrawArc(v22, new Vector2(v22.X - 2, v22.Y - 10), v22);
            //
            Vector2[] Line41 = { v30, v48 };
            fun.drawBLine(dxf, Line41, 0.5, contour);
            Vector2[] Line42 = { v49, v48 };
            fun.drawBLine(dxf, Line42, 0.5, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v49));
            Arc4.Vertexes.Add(new LwPolylineVertex(v50));
            Arc4.Vertexes[0].Bulge = r * 4.6;
            fun.PolyFill(dxf, Arc4, 0.5, contour);
            Vector2[] Line43 = { v50, v51 };
            fun.drawBLine(dxf, Line43, 0.5, contour);
            //
            Vector2[] Line44 = { v38, v52 };
            fun.drawBLine(dxf, Line44, 0.5, contour);
            Vector2[] Line45 = { v51, v52 };
            fun.drawBLine(dxf, Line45, 0.5, contour);
            //
            //Vector2[] Line46 = { v47, v52 };
            //fun.drawBLine(dxf, Line46, 0.08, skdimensioning);
            //
            //LwPolyline poly = new LwPolyline();
            //poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 3)));
            //poly.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, Math.PI, fai / 3)));
            //poly.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 3)));
            //fun.PolyFill(dxf, poly, 0.15, contour);
            //LwPolyline poly1 = new LwPolyline();
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, h / 7.5)));
            //poly1.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, Math.PI, h / 7.5)));
            //poly1.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, h / 7.5)));
            //fun.PolyFill(dxf, poly1, 0.15, contour);
            //LwPolyline poly2 = new LwPolyline();
            //poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 2)));
            //poly2.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, Math.PI, fai / 2)));
            //poly2.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 2)));
            //fun.PolyFill(dxf, poly2, 0.08, refin);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v22.X - fai / 2 - 1, v22.Y), new Vector2(v22.X + fai / 2 + 1, v22.Y) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v22.X, v22.Y + fai / 2 + 1), new Vector2(v22.X, v22.Y - fai / 2 - 1) }, centre, Linetype.Center);
            ////
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v20.X - l / 6, v20.Y + (fai / 2) * 1.1), new Vector2(v21.X + l / 25, v21.Y + (fai / 2) * 1.1) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v20.X - l / 6, v20.Y + (fai / 2) / 4), new Vector2(v21.X + l / 25, v21.Y + (fai / 2) / 4) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v20.X - l / 6, v20.Y + (fai / 2) / 1.47), new Vector2(v21.X + l / 25, v21.Y + (fai / 2) / 1.47) }, centre, Linetype.Center);
            ////
            //DimensionStyle dimensionStyle = fun.CreateDimStyle();
            //dimensionStyle.ArrowSize = 1;
            //dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.TextHeight = 0.8;
            //double offset = 6;
            //LinearDimension dim1 = new LinearDimension(new Line(v1, v2), offset, 360, dimensionStyle);
            //dim1.UserText = "3.5 ";
            //dxf.AddEntity(dim1);
            //LinearDimension dim2 = new LinearDimension(new Line(v10, v11), offset, 180, dimensionStyle);
            //dim2.UserText = "3.63 ";
            //dxf.AddEntity(dim2);
            ////
            //LinearDimension dim3 = new LinearDimension(new Line(v27, v37), offset * 2, 270, dimensionStyle);
            //dim3.UserText = "16.5 ";
            //dxf.AddEntity(dim3);
            //LinearDimension dim4 = new LinearDimension(new Line(v27, v31), offset * 1.2, 270, dimensionStyle);
            //dim4.UserText = "1.12 ";
            //dxf.AddEntity(dim4);
            //LinearDimension dim5 = new LinearDimension(new Line(v27, v31), offset * 1.2, 360, dimensionStyle);
            //dim5.UserText = "1.5 ";
            //dxf.AddEntity(dim5);
            ////
            //RadialDimension dimrad1 = new RadialDimension(arc1, -36, 1, dimensionStyle);
            //dimrad1.UserText = "R0.14";
            //dxf.AddEntity(dimrad1);
            ////
            //RadialDimension dimrad2 = new RadialDimension(arc2, 79, 1, dimensionStyle);
            //dimrad2.UserText = "Φ9.52";
            //dxf.AddEntity(dimrad2);
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint56(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double l = 3.5;
            double pi = Math.PI;
            double epsr = 45 * pi / 180;
            double l2 = 3.63;
            double h = 16.5;
            double ch = 1.12;
            double cl = 1.5;
            double r = 0.14;
            double fai = 9.52;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + l, v1.Y);
            Vector2 v3 = new Vector2(v1.X + l / 8, v1.Y - l / 4);
            Vector2 v4 = new Vector2(v2.X, v1.Y - l / 4);
            //
            Vector2 v5 = new Vector2(v3.X + l / 8, v3.Y - l / 4);
            Vector2 v6 = new Vector2(v5.X - l / 8, v5.Y - l / 2);
            Vector2 v7 = new Vector2(v1.X, v6.Y - l / 10);
            Vector2 v8 = new Vector2(v7.X, v7.Y - l / 1.6);
            Vector2 v9 = new Vector2(v8.X + l / 5, v8.Y - l / 3);
            Vector2 v10 = new Vector2(v8.X, v8.Y - l * 2);
            //
            Vector2 v11 = new Vector2(v4.X, v10.Y);
            Vector2 v12 = new Vector2(v11.X, v11.Y - l / 10);
            //底上线
            Vector2 v13 = new Vector2(v10.X + l / 8, v10.Y + l / 3);
            //
            Vector2 v14 = new Vector2(v4.X, v13.Y);
            //
            Vector2 v15 = new Vector2(v11.X, v11.Y - l / 10);
            //
            Vector2 v16 = new Vector2(v15.X - l / 1.2, v15.Y);
            //
            Vector2 v17 = new Vector2(v16.X, v10.Y);
            Vector2 v18 = new Vector2(v13.X, v13.Y + l / 16);
            Vector2 v19 = new Vector2(v18.X + l / 1.16, v18.Y);
            //
            Vector2 v20 = new Vector2(v18.X + l / 20, v18.Y + l / 3);
            Vector2 v21 = new Vector2(v4.X, v20.Y);
            //旋转三角刀片
            Vector2 v22 = new Vector2(v1.X + h * 2, v1.Y - h / 2.2);
            //切削面
            Vector2 v23 = new Vector2(v22.X - h / 14, v22.Y - fai / 2);
            Vector2 v24 = new Vector2(v22.X - fai / 1.76, v22.Y + h / 6.9);
            //切线you
            Vector2 v25 = new Vector2(v22.X + fai / 2, v22.Y);
            Vector2 v26 = new Vector2(v25.X, v25.Y + h / 2 - ch * 2);
            //
            Vector2 v27 = new Vector2(v26.X, v26.Y + ch * 2);
            Vector2 v28 = new Vector2(v26.X - cl / 2, v26.Y);
            //zuo
            Vector2 v29 = new Vector2(v27.X - cl * 2.7, v26.Y);
            Vector2 v30 = new Vector2(v29.X - (cl * 2.74) * 1.86, v29.Y - ch * 4.06);
            //切线右尺口
            Vector2 v31 = new Vector2(v28.X - cl / 3.2, v28.Y + ch / 1.3);
            Vector2 v32 = new Vector2(v31.X - (cl - cl / 3.2 - cl / 2) * 3, v31.Y);
            Vector2 v33 = new Vector2(v32.X - cl / 3.2, v28.Y);
            //上侧横线
            Vector2 v34 = new Vector2(v25.X, v25.Y + h / 2 - ch * 4.2);
            Vector2 v35 = new Vector2(v34.X - fai / 1.2, v34.Y);
            //下部分端口
            Vector2 v36 = new Vector2(v25.X, v25.Y - h / 2 + ch * 5.2);
            Vector2 v37 = new Vector2(v36.X, v36.Y - ch * 5.2);
            //下端斜线
            Vector2 v38 = new Vector2(v32.X, v37.Y + ch);
            Vector2 v39 = new Vector2(v38.X - (cl * 2.74) * 2.2, v38.Y + ch * 4.8);
            //下端尺口
            Vector2 v40 = new Vector2(v38.X + (cl / 2.6) * Math.Sin(epsr), v38.Y + cl / 2 * Math.Sin(epsr));
            Vector2 v41 = new Vector2(v40.X + ch * 1.1, v40.Y + cl / 3.2);
            Vector2 v42 = new Vector2(v41.X, v41.Y + (cl - cl / 3.2 - cl / 2) * 3);
            Vector2 v43 = new Vector2(v40.X + cl / 3.6, v42.Y + cl / 3.2);
            //
            Vector2 v44 = new Vector2(v38.X - cl * 1.2, v38.Y + cl / 1.4);
            Vector2 v45 = new Vector2(v25.X, v25.Y + cl * 1.2);
            //
            Vector2 v46 = new Vector2(v30.X - ch * 2.08, v30.Y - ch * 1.28);
            Vector2 v47 = new Vector2(v39.X - ch * 2.6, v39.Y + ch * 1.6);
            //
            Vector2 v48 = new Vector2(v30.X + (cl / 2.6) * Math.Sin(epsr), v30.Y - cl / 2 * Math.Sin(epsr));
            Vector2 v49 = new Vector2(v48.X - cl / 4, v48.Y - ch * 1.7);
            Vector2 v50 = new Vector2(v49.X + (cl - cl / 3.2 - cl / 2) * 3, v49.Y - (cl - cl / 3.2 - cl / 2) * 3 / 2);
            Vector2 v51 = new Vector2(v50.X + cl / 2.6, v50.Y + cl / 2.3);
            //
            Vector2 v52 = new Vector2(v38.X - (cl * 2.74) * 1.7, v38.Y + ch * 3.6);
            //线段
            //主视图
            //Vector2[] Line1 = { v1, v2 };
            //fun.drawBLine(dxf, Line1, 0.15, contour);
            //Vector2[] Line2 = { v4, v2 };
            //fun.drawBLine(dxf, Line2, 0.15, contour);
            //Vector2[] Line3 = { v1, v3 };
            //fun.drawBLine(dxf, Line3, 0.15, contour);
            //Vector2[] Line4 = { v4, v3 };
            //fun.drawBLine(dxf, Line4, 0.15, contour);
            //Vector2[] Line5 = { v5, v3 };
            //fun.drawBLine(dxf, Line5, 0.15, contour);
            //LwPolyline Arc1 = new LwPolyline();
            //Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            //Arc1.Vertexes.Add(new LwPolylineVertex(v6));
            //Arc1.Vertexes[0].Bulge = -l / 10;
            //fun.PolyFill(dxf, Arc1, 0.15, contour);
            //Vector2[] Line6 = { v6, v7 };
            //fun.drawBLine(dxf, Line6, 0.15, contour);
            //Vector2[] Line7 = { v8, v7 };
            //fun.drawBLine(dxf, Line7, 0.15, contour);
            //Vector2[] Line8 = { v8, v9 };
            //fun.drawBLine(dxf, Line8, 0.15, contour);
            //Vector2[] Line9 = { v8, v10 };
            //fun.drawBLine(dxf, Line9, 0.15, contour);
            //Vector2[] Line10 = { v4, v11 };
            //fun.drawBLine(dxf, Line10, 0.15, contour);
            //Vector2[] Line11 = { v10, v11 };
            //fun.drawBLine(dxf, Line11, 0.15, contour);
            //Vector2[] Line12 = { v10, v13 };
            //fun.drawBLine(dxf, Line12, 0.15, contour);
            //Vector2[] Line13 = { v9, v13 };
            //fun.drawBLine(dxf, Line13, 0.15, contour);
            //Vector2[] Line14 = { v14, v13 };
            //fun.drawBLine(dxf, Line14, 0.15, contour);
            //Vector2[] Line15 = { v15, v11 };
            //fun.drawBLine(dxf, Line15, 0.15, contour);
            //Vector2[] Line16 = { v15, v16 };
            //fun.drawBLine(dxf, Line16, 0.15, contour);
            //Vector2[] Line17 = { v17, v16 };
            //fun.drawBLine(dxf, Line17, 0.15, contour);
            //Vector2[] Line18 = { v19, v18 };
            //fun.drawBLine(dxf, Line18, 0.15, contour);
            //Vector2[] Line19 = { v20, v21 };
            //fun.drawBLine(dxf, Line19, 0.15, contour);
            //内切削面
            //Vector2[] Line20 = { v23, v24 };
            //fun.drawBLine(dxf, Line20, 0.15, contour);
            ////切线
            //Vector2[] Line21 = { v25, v26 };
            //fun.drawBLine(dxf, Line21, 0.15, contour);
            ////切上
            ////Vector2[] Line22 = { v27, v26 };
            ////fun.drawBLine(dxf, Line22, 0.08, skdimensioning);
            //Vector2[] Line23 = { v26, v28 };
            //fun.drawBLine(dxf, Line23, 0.15, contour);
            ////zou
            ////Vector2[] Line24 = { v27, v29 };
            ////fun.drawBLine(dxf, Line24, 0.08, skdimensioning);
            //Vector2[] Line25 = { v29, v30 };
            //fun.drawBLine(dxf, Line25, 0.15, contour);
            ////右尺口
            //Vector2[] Line26 = { v28, v31 };
            //fun.drawBLine(dxf, Line26, 0.15, contour);
            //LwPolyline Arc2 = new LwPolyline();
            //Arc2.Vertexes.Add(new LwPolylineVertex(v32));
            //Arc2.Vertexes.Add(new LwPolylineVertex(v31));
            //Arc2.Vertexes[0].Bulge = -r * 4.6;
            //fun.PolyFill(dxf, Arc2, 0.15, contour);
            //Vector2[] Line27 = { v33, v32 };
            //fun.drawBLine(dxf, Line27, 0.15, contour);
            //Vector2[] Line28 = { v33, v29 };
            //fun.drawBLine(dxf, Line28, 0.15, contour);
            //Vector2[] Line29 = { v34, v35 };
            //fun.drawBLine(dxf, Line29, 0.15, contour);
            ////下半部分
            //Vector2[] Line30 = { v25, v36 };
            //fun.drawBLine(dxf, Line30, 0.15, contour);
            ////Vector2[] Line31 = { v37, v36 };
            ////fun.drawBLine(dxf, Line31, 0.08, skdimensioning);
            ////下端斜线
            ////Vector2[] Line32 = { v37, v38 };
            ////fun.drawBLine(dxf, Line32, 0.08, skdimensioning);
            ////Vector2[] Line33 = { v38, v39 };
            ////fun.drawBLine(dxf, Line33, 0.15, contour);
            ////下端尺口
            //Vector2[] Line34 = { v38, v40 };
            //fun.drawBLine(dxf, Line34, 0.15, contour);
            //Vector2[] Line35 = { v41, v40 };
            //fun.drawBLine(dxf, Line35, 0.15, contour);
            //LwPolyline Arc3 = new LwPolyline();
            //Arc3.Vertexes.Add(new LwPolylineVertex(v42));
            //Arc3.Vertexes.Add(new LwPolylineVertex(v41));
            //Arc3.Vertexes[0].Bulge = -r * 4.6;
            //fun.PolyFill(dxf, Arc3, 0.15, contour);
            //Vector2[] Line36 = { v43, v42 };
            //fun.drawBLine(dxf, Line36, 0.15, contour);
            //Vector2[] Line37 = { v43, v36 };
            //fun.drawBLine(dxf, Line37, 0.15, contour);
            ////
            //Vector2[] Line38 = { v44, v45 };
            //fun.drawBLine(dxf, Line38, 0.15, contour);
            ////
            ////Vector2[] Line39 = { v30, v46 };
            ////fun.drawBLine(dxf, Line39, 0.08, skdimensioning);
            ////Vector2[] Line40 = { v39, v47 };
            ////fun.drawBLine(dxf, Line40, 0.08, skdimensioning);
            //Arc arc1 = fun.DrawArc(v32, new Vector2(v32.X - 6, v32.Y + 5), v32);
            //Arc arc2 = fun.DrawArc(v22, new Vector2(v22.X - 2, v22.Y - 10), v22);
            ////
            //Vector2[] Line41 = { v30, v48 };
            //fun.drawBLine(dxf, Line41, 0.15, contour);
            //Vector2[] Line42 = { v49, v48 };
            //fun.drawBLine(dxf, Line42, 0.15, contour);
            //LwPolyline Arc4 = new LwPolyline();
            //Arc4.Vertexes.Add(new LwPolylineVertex(v49));
            //Arc4.Vertexes.Add(new LwPolylineVertex(v50));
            //Arc4.Vertexes[0].Bulge = r * 4.6;
            //fun.PolyFill(dxf, Arc4, 0.15, contour);
            //Vector2[] Line43 = { v50, v51 };
            //fun.drawBLine(dxf, Line43, 0.15, contour);
            ////
            //Vector2[] Line44 = { v38, v52 };
            //fun.drawBLine(dxf, Line44, 0.15, contour);
            //Vector2[] Line45 = { v51, v52 };
            //fun.drawBLine(dxf, Line45, 0.15, contour);
            ////
            ////Vector2[] Line46 = { v47, v52 };
            ////fun.drawBLine(dxf, Line46, 0.08, skdimensioning);
            ////
            //LwPolyline poly = new LwPolyline();
            //poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 3)));
            //poly.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, Math.PI, fai / 3)));
            //poly.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 3)));
            //fun.PolyFill(dxf, poly, 0.15, contour);
            //LwPolyline poly1 = new LwPolyline();
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, h / 7.5)));
            //poly1.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, Math.PI, h / 7.5)));
            //poly1.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, h / 7.5)));
            //fun.PolyFill(dxf, poly1, 0.15, contour);
            LwPolyline poly2 = new LwPolyline();
            poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 2)));
            poly2.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, Math.PI, fai / 2)));
            poly2.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 2)));
            fun.PolyFill(dxf, poly2, 0.25, refin);
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v22.X - fai / 2 - 1, v22.Y), new Vector2(v22.X + fai / 2 + 1, v22.Y) },0.25, centre, Linetype.Center);
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v22.X, v22.Y + fai / 2 + 1), new Vector2(v22.X, v22.Y - fai / 2 - 1) }, 0.25,centre, Linetype.Center);
            ////
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v20.X - l / 6, v20.Y + (fai / 2) * 1.1), new Vector2(v21.X + l / 25, v21.Y + (fai / 2) * 1.1) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v20.X - l / 6, v20.Y + (fai / 2) / 4), new Vector2(v21.X + l / 25, v21.Y + (fai / 2) / 4) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v20.X - l / 6, v20.Y + (fai / 2) / 1.47), new Vector2(v21.X + l / 25, v21.Y + (fai / 2) / 1.47) }, centre, Linetype.Center);
            ////
            //DimensionStyle dimensionStyle = fun.CreateDimStyle();
            //dimensionStyle.ArrowSize = 1;
            //dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.TextHeight = 0.8;
            //double offset = 6;
            //LinearDimension dim1 = new LinearDimension(new Line(v1, v2), offset, 360, dimensionStyle);
            //dim1.UserText = "3.5 ";
            //dxf.AddEntity(dim1);
            //LinearDimension dim2 = new LinearDimension(new Line(v10, v11), offset, 180, dimensionStyle);
            //dim2.UserText = "3.63 ";
            //dxf.AddEntity(dim2);
            ////
            //LinearDimension dim3 = new LinearDimension(new Line(v27, v37), offset * 2, 270, dimensionStyle);
            //dim3.UserText = "16.5 ";
            //dxf.AddEntity(dim3);
            //LinearDimension dim4 = new LinearDimension(new Line(v27, v31), offset * 1.2, 270, dimensionStyle);
            //dim4.UserText = "1.12 ";
            //dxf.AddEntity(dim4);
            //LinearDimension dim5 = new LinearDimension(new Line(v27, v31), offset * 1.2, 360, dimensionStyle);
            //dim5.UserText = "1.5 ";
            //dxf.AddEntity(dim5);
            ////
            //RadialDimension dimrad1 = new RadialDimension(arc1, -36, 1, dimensionStyle);
            //dimrad1.UserText = "R0.14";
            //dxf.AddEntity(dimrad1);
            ////
            //RadialDimension dimrad2 = new RadialDimension(arc2, 79, 1, dimensionStyle);
            //dimrad2.UserText = "Φ9.52";
            //dxf.AddEntity(dimrad2);
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint58(Dictionary<string, Object> data)   //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double l = 3.5;
            double pi = Math.PI;
            double epsr = 45 * pi / 180;
            double l2 = 3.63;
            double h = 16.5;
            double ch = 1.12;
            double cl = 1.5;
            double r = 0.14;
            double fai = 9.52;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + l, v1.Y);
            Vector2 v3 = new Vector2(v1.X + l / 8, v1.Y - l / 4);
            Vector2 v4 = new Vector2(v2.X, v1.Y - l / 4);
            //
            Vector2 v5 = new Vector2(v3.X + l / 8, v3.Y - l / 4);
            Vector2 v6 = new Vector2(v5.X - l / 8, v5.Y - l / 2);
            Vector2 v7 = new Vector2(v1.X, v6.Y - l / 10);
            Vector2 v8 = new Vector2(v7.X, v7.Y - l / 1.6);
            Vector2 v9 = new Vector2(v8.X + l / 5, v8.Y - l / 3);
            Vector2 v10 = new Vector2(v8.X, v8.Y - l * 2);
            //
            Vector2 v11 = new Vector2(v4.X, v10.Y);
            Vector2 v12 = new Vector2(v11.X, v11.Y - l / 10);
            //底上线
            Vector2 v13 = new Vector2(v10.X + l / 8, v10.Y + l / 3);
            //
            Vector2 v14 = new Vector2(v4.X, v13.Y);
            //
            Vector2 v15 = new Vector2(v11.X, v11.Y - l / 10);
            //
            Vector2 v16 = new Vector2(v15.X - l / 1.2, v15.Y);
            //
            Vector2 v17 = new Vector2(v16.X, v10.Y);
            Vector2 v18 = new Vector2(v13.X, v13.Y + l / 16);
            Vector2 v19 = new Vector2(v18.X + l / 1.16, v18.Y);
            //
            Vector2 v20 = new Vector2(v18.X + l / 20, v18.Y + l / 3);
            Vector2 v21 = new Vector2(v4.X, v20.Y);
            //旋转三角刀片
            Vector2 v22 = new Vector2(v1.X + h * 2, v1.Y - h / 2.2);
            //切削面
            Vector2 v23 = new Vector2(v22.X - h / 14, v22.Y - fai / 2);
            Vector2 v24 = new Vector2(v22.X - fai / 1.76, v22.Y + h / 6.9);
            //切线you
            Vector2 v25 = new Vector2(v22.X + fai / 2, v22.Y);
            Vector2 v26 = new Vector2(v25.X, v25.Y + h / 2 - ch * 2);
            //
            Vector2 v27 = new Vector2(v26.X, v26.Y + ch * 2);
            Vector2 v28 = new Vector2(v26.X - cl / 2, v26.Y);
            //zuo
            Vector2 v29 = new Vector2(v27.X - cl * 2.7, v26.Y);
            Vector2 v30 = new Vector2(v29.X - (cl * 2.74) * 1.86, v29.Y - ch * 4.06);
            //切线右尺口
            Vector2 v31 = new Vector2(v28.X - cl / 3.2, v28.Y + ch / 1.3);
            Vector2 v32 = new Vector2(v31.X - (cl - cl / 3.2 - cl / 2) * 3, v31.Y);
            Vector2 v33 = new Vector2(v32.X - cl / 3.2, v28.Y);
            //上侧横线
            Vector2 v34 = new Vector2(v25.X, v25.Y + h / 2 - ch * 4.2);
            Vector2 v35 = new Vector2(v34.X - fai / 1.2, v34.Y);
            //下部分端口
            Vector2 v36 = new Vector2(v25.X, v25.Y - h / 2 + ch * 5.2);
            Vector2 v37 = new Vector2(v36.X, v36.Y - ch * 5.2);
            //下端斜线
            Vector2 v38 = new Vector2(v32.X, v37.Y + ch);
            Vector2 v39 = new Vector2(v38.X - (cl * 2.74) * 2.2, v38.Y + ch * 4.8);
            //下端尺口
            Vector2 v40 = new Vector2(v38.X + (cl / 2.6) * Math.Sin(epsr), v38.Y + cl / 2 * Math.Sin(epsr));
            Vector2 v41 = new Vector2(v40.X + ch * 1.1, v40.Y + cl / 3.2);
            Vector2 v42 = new Vector2(v41.X, v41.Y + (cl - cl / 3.2 - cl / 2) * 3);
            Vector2 v43 = new Vector2(v40.X + cl / 3.6, v42.Y + cl / 3.2);
            //
            Vector2 v44 = new Vector2(v38.X - cl * 1.2, v38.Y + cl / 1.4);
            Vector2 v45 = new Vector2(v25.X, v25.Y + cl * 1.2);
            //
            Vector2 v46 = new Vector2(v30.X - ch * 2.08, v30.Y - ch * 1.28);
            Vector2 v47 = new Vector2(v39.X - ch * 2.6, v39.Y + ch * 1.6);
            //
            Vector2 v48 = new Vector2(v30.X + (cl / 2.6) * Math.Sin(epsr), v30.Y - cl / 2 * Math.Sin(epsr));
            Vector2 v49 = new Vector2(v48.X - cl / 4, v48.Y - ch * 1.7);
            Vector2 v50 = new Vector2(v49.X + (cl - cl / 3.2 - cl / 2) * 3, v49.Y - (cl - cl / 3.2 - cl / 2) * 3 / 2);
            Vector2 v51 = new Vector2(v50.X + cl / 2.6, v50.Y + cl / 2.3);
            //
            Vector2 v52 = new Vector2(v38.X - (cl * 2.74) * 1.7, v38.Y + ch * 3.6);
            //线段
            //主视图
            Vector2[] Line1 = { v1, v2 };
            fun.drawBLine(dxf, Line1, 0.5, contour);
            Vector2[] Line2 = { v4, v2 };
            fun.drawBLine(dxf, Line2, 0.5, contour);
            Vector2[] Line3 = { v1, v3 };
            fun.drawBLine(dxf, Line3, 0.5, contour);
            Vector2[] Line4 = { v4, v3 };
            fun.drawBLine(dxf, Line4, 0.5, contour);
            Vector2[] Line5 = { v5, v3 };
            fun.drawBLine(dxf, Line5, 0.5, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            Arc1.Vertexes.Add(new LwPolylineVertex(v6));
            Arc1.Vertexes[0].Bulge = -l / 10;
            fun.PolyFill(dxf, Arc1, 0.5, contour);
            Vector2[] Line6 = { v6, v7 };
            fun.drawBLine(dxf, Line6, 0.5, contour);
            Vector2[] Line7 = { v8, v7 };
            fun.drawBLine(dxf, Line7, 0.5, contour);
            Vector2[] Line8 = { v8, v9 };
            fun.drawBLine(dxf, Line8, 0.5, contour);
            Vector2[] Line9 = { v8, v10 };
            fun.drawBLine(dxf, Line9, 0.5, contour);
            Vector2[] Line10 = { v4, v11 };
            fun.drawBLine(dxf, Line10, 0.5, contour);
            Vector2[] Line11 = { v10, v11 };
            fun.drawBLine(dxf, Line11, 0.5, contour);
            Vector2[] Line12 = { v10, v13 };
            fun.drawBLine(dxf, Line12, 0.5, contour);
            Vector2[] Line13 = { v9, v13 };
            fun.drawBLine(dxf, Line13, 0.5, contour);
            Vector2[] Line14 = { v14, v13 };
            fun.drawBLine(dxf, Line14, 0.5, contour);
            Vector2[] Line15 = { v15, v11 };
            fun.drawBLine(dxf, Line15, 0.5, contour);
            Vector2[] Line16 = { v15, v16 };
            fun.drawBLine(dxf, Line16, 0.5, contour);
            Vector2[] Line17 = { v17, v16 };
            fun.drawBLine(dxf, Line17, 0.5, contour);
            Vector2[] Line18 = { v19, v18 };
            fun.drawBLine(dxf, Line18, 0.5, contour);
            Vector2[] Line19 = { v20, v21 };
            fun.drawBLine(dxf, Line19, 0.5, contour);
            //内切削面
            //Vector2[] Line20 = { v23, v24 };
            //fun.drawBLine(dxf, Line20, 0.15, contour);
            ////切线
            //Vector2[] Line21 = { v25, v26 };
            //fun.drawBLine(dxf, Line21, 0.15, contour);
            ////切上
            //Vector2[] Line22 = { v27, v26 };
            //fun.drawBLine(dxf, Line22, 0.08, skdimensioning);
            //Vector2[] Line23 = { v26, v28 };
            //fun.drawBLine(dxf, Line23, 0.15, contour);
            ////zou
            //Vector2[] Line24 = { v27, v29 };
            //fun.drawBLine(dxf, Line24, 0.08, skdimensioning);
            //Vector2[] Line25 = { v29, v30 };
            //fun.drawBLine(dxf, Line25, 0.15, contour);
            ////右尺口
            //Vector2[] Line26 = { v28, v31 };
            //fun.drawBLine(dxf, Line26, 0.15, contour);
            //LwPolyline Arc2 = new LwPolyline();
            //Arc2.Vertexes.Add(new LwPolylineVertex(v32));
            //Arc2.Vertexes.Add(new LwPolylineVertex(v31));
            //Arc2.Vertexes[0].Bulge = -r * 4.6;
            //fun.PolyFill(dxf, Arc2, 0.15, contour);
            //Vector2[] Line27 = { v33, v32 };
            //fun.drawBLine(dxf, Line27, 0.15, contour);
            //Vector2[] Line28 = { v33, v29 };
            //fun.drawBLine(dxf, Line28, 0.15, contour);
            //Vector2[] Line29 = { v34, v35 };
            //fun.drawBLine(dxf, Line29, 0.15, contour);
            ////下半部分
            //Vector2[] Line30 = { v25, v36 };
            //fun.drawBLine(dxf, Line30, 0.15, contour);
            //Vector2[] Line31 = { v37, v36 };
            //fun.drawBLine(dxf, Line31, 0.08, skdimensioning);
            ////下端斜线
            //Vector2[] Line32 = { v37, v38 };
            //fun.drawBLine(dxf, Line32, 0.08, skdimensioning);
            ////Vector2[] Line33 = { v38, v39 };
            ////fun.drawBLine(dxf, Line33, 0.15, contour);
            ////下端尺口
            //Vector2[] Line34 = { v38, v40 };
            //fun.drawBLine(dxf, Line34, 0.15, contour);
            //Vector2[] Line35 = { v41, v40 };
            //fun.drawBLine(dxf, Line35, 0.15, contour);
            //LwPolyline Arc3 = new LwPolyline();
            //Arc3.Vertexes.Add(new LwPolylineVertex(v42));
            //Arc3.Vertexes.Add(new LwPolylineVertex(v41));
            //Arc3.Vertexes[0].Bulge = -r * 4.6;
            //fun.PolyFill(dxf, Arc3, 0.15, contour);
            //Vector2[] Line36 = { v43, v42 };
            //fun.drawBLine(dxf, Line36, 0.15, contour);
            //Vector2[] Line37 = { v43, v36 };
            //fun.drawBLine(dxf, Line37, 0.15, contour);
            ////
            //Vector2[] Line38 = { v44, v45 };
            //fun.drawBLine(dxf, Line38, 0.15, contour);
            ////
            //Vector2[] Line39 = { v30, v46 };
            //fun.drawBLine(dxf, Line39, 0.08, skdimensioning);
            //Vector2[] Line40 = { v39, v47 };
            //fun.drawBLine(dxf, Line40, 0.08, skdimensioning);
            //Arc arc1 = fun.DrawArc(v32, new Vector2(v32.X - 6, v32.Y + 5), v32);
            //Arc arc2 = fun.DrawArc(v22, new Vector2(v22.X - 2, v22.Y - 10), v22);
            ////
            //Vector2[] Line41 = { v30, v48 };
            //fun.drawBLine(dxf, Line41, 0.15, contour);
            //Vector2[] Line42 = { v49, v48 };
            //fun.drawBLine(dxf, Line42, 0.15, contour);
            //LwPolyline Arc4 = new LwPolyline();
            //Arc4.Vertexes.Add(new LwPolylineVertex(v49));
            //Arc4.Vertexes.Add(new LwPolylineVertex(v50));
            //Arc4.Vertexes[0].Bulge = r * 4.6;
            //fun.PolyFill(dxf, Arc4, 0.15, contour);
            //Vector2[] Line43 = { v50, v51 };
            //fun.drawBLine(dxf, Line43, 0.15, contour);
            ////
            //Vector2[] Line44 = { v38, v52 };
            //fun.drawBLine(dxf, Line44, 0.15, contour);
            //Vector2[] Line45 = { v51, v52 };
            //fun.drawBLine(dxf, Line45, 0.15, contour);
            ////
            //Vector2[] Line46 = { v47, v52 };
            //fun.drawBLine(dxf, Line46, 0.08, skdimensioning);
            ////
            //LwPolyline poly = new LwPolyline();
            //poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 3)));
            //poly.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, Math.PI, fai / 3)));
            //poly.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 3)));
            //fun.PolyFill(dxf, poly, 0.15, contour);
            //LwPolyline poly1 = new LwPolyline();
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, h / 7.5)));
            //poly1.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, Math.PI, h / 7.5)));
            //poly1.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, h / 7.5)));
            //fun.PolyFill(dxf, poly1, 0.15, contour);
            //LwPolyline poly2 = new LwPolyline();
            //poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 2)));
            //poly2.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, Math.PI, fai / 2)));
            //poly2.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 2)));
            //fun.PolyFill(dxf, poly2, 0.08, refin);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v22.X - fai / 2 - 1, v22.Y), new Vector2(v22.X + fai / 2 + 1, v22.Y) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v22.X, v22.Y + fai / 2 + 1), new Vector2(v22.X, v22.Y - fai / 2 - 1) }, centre, Linetype.Center);
            ////
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v20.X - l / 6, v20.Y + (fai / 2) * 1.1), new Vector2(v21.X + l / 25, v21.Y + (fai / 2) * 1.1) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v20.X - l / 6, v20.Y + (fai / 2) / 4), new Vector2(v21.X + l / 25, v21.Y + (fai / 2) / 4) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v20.X - l / 6, v20.Y + (fai / 2) / 1.47), new Vector2(v21.X + l / 25, v21.Y + (fai / 2) / 1.47) }, centre, Linetype.Center);
            ////
            //DimensionStyle dimensionStyle = fun.CreateDimStyle();
            //dimensionStyle.ArrowSize = 1;
            //dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.TextHeight = 0.8;
            //double offset = 6;
            //LinearDimension dim1 = new LinearDimension(new Line(v1, v2), offset, 360, dimensionStyle);
            //dim1.UserText = "3.5 ";
            //dxf.AddEntity(dim1);
            //LinearDimension dim2 = new LinearDimension(new Line(v10, v11), offset, 180, dimensionStyle);
            //dim2.UserText = "3.63 ";
            //dxf.AddEntity(dim2);
            ////
            //LinearDimension dim3 = new LinearDimension(new Line(v27, v37), offset * 2, 270, dimensionStyle);
            //dim3.UserText = "16.5 ";
            //dxf.AddEntity(dim3);
            //LinearDimension dim4 = new LinearDimension(new Line(v27, v31), offset * 1.2, 270, dimensionStyle);
            //dim4.UserText = "1.12 ";
            //dxf.AddEntity(dim4);
            //LinearDimension dim5 = new LinearDimension(new Line(v27, v31), offset * 1.2, 360, dimensionStyle);
            //dim5.UserText = "1.5 ";
            //dxf.AddEntity(dim5);
            ////
            //RadialDimension dimrad1 = new RadialDimension(arc1, -36, 1, dimensionStyle);
            //dimrad1.UserText = "R0.14";
            //dxf.AddEntity(dimrad1);
            ////
            //RadialDimension dimrad2 = new RadialDimension(arc2, 79, 1, dimensionStyle);
            //dimrad2.UserText = "Φ9.52";
            //dxf.AddEntity(dimrad2);
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint59(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double l = 3.5;
            double pi = Math.PI;
            double epsr = 45 * pi / 180;
            double l2 = 3.63;
            double h = 16.5;
            double ch = 1.12;
            double cl = 1.5;
            double r = 0.14;
            double fai = 9.52;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + l, v1.Y);
            Vector2 v3 = new Vector2(v1.X + l / 8, v1.Y - l / 4);
            Vector2 v4 = new Vector2(v2.X, v1.Y - l / 4);
            //
            Vector2 v5 = new Vector2(v3.X + l / 8, v3.Y - l / 4);
            Vector2 v6 = new Vector2(v5.X - l / 8, v5.Y - l / 2);
            Vector2 v7 = new Vector2(v1.X, v6.Y - l / 10);
            Vector2 v8 = new Vector2(v7.X, v7.Y - l / 1.6);
            Vector2 v9 = new Vector2(v8.X + l / 5, v8.Y - l / 3);
            Vector2 v10 = new Vector2(v8.X, v8.Y - l * 2);
            //
            Vector2 v11 = new Vector2(v4.X, v10.Y);
            Vector2 v12 = new Vector2(v11.X, v11.Y - l / 10);
            //底上线
            Vector2 v13 = new Vector2(v10.X + l / 8, v10.Y + l / 3);
            //
            Vector2 v14 = new Vector2(v4.X, v13.Y);
            //
            Vector2 v15 = new Vector2(v11.X, v11.Y - l / 10);
            //
            Vector2 v16 = new Vector2(v15.X - l / 1.2, v15.Y);
            //
            Vector2 v17 = new Vector2(v16.X, v10.Y);
            Vector2 v18 = new Vector2(v13.X, v13.Y + l / 16);
            Vector2 v19 = new Vector2(v18.X + l / 1.16, v18.Y);
            //
            Vector2 v20 = new Vector2(v18.X + l / 20, v18.Y + l / 3);
            Vector2 v21 = new Vector2(v4.X, v20.Y);
            //旋转三角刀片
            Vector2 v22 = new Vector2(v1.X + h * 2, v1.Y - h / 2.2);
            //切削面
            Vector2 v23 = new Vector2(v22.X - h / 14, v22.Y - fai / 2);
            Vector2 v24 = new Vector2(v22.X - fai / 1.76, v22.Y + h / 6.9);
            //切线you
            Vector2 v25 = new Vector2(v22.X + fai / 2, v22.Y);
            Vector2 v26 = new Vector2(v25.X, v25.Y + h / 2 - ch * 2);
            //
            Vector2 v27 = new Vector2(v26.X, v26.Y + ch * 2);
            Vector2 v28 = new Vector2(v26.X - cl / 2, v26.Y);
            //zuo
            Vector2 v29 = new Vector2(v27.X - cl * 2.7, v26.Y);
            Vector2 v30 = new Vector2(v29.X - (cl * 2.74) * 1.86, v29.Y - ch * 4.06);
            //切线右尺口
            Vector2 v31 = new Vector2(v28.X - cl / 3.2, v28.Y + ch / 1.3);
            Vector2 v32 = new Vector2(v31.X - (cl - cl / 3.2 - cl / 2) * 3, v31.Y);
            Vector2 v33 = new Vector2(v32.X - cl / 3.2, v28.Y);
            //上侧横线
            Vector2 v34 = new Vector2(v25.X, v25.Y + h / 2 - ch * 4.2);
            Vector2 v35 = new Vector2(v34.X - fai / 1.2, v34.Y);
            //下部分端口
            Vector2 v36 = new Vector2(v25.X, v25.Y - h / 2 + ch * 5.2);
            Vector2 v37 = new Vector2(v36.X, v36.Y - ch * 5.2);
            //下端斜线
            Vector2 v38 = new Vector2(v32.X, v37.Y + ch);
            Vector2 v39 = new Vector2(v38.X - (cl * 2.74) * 2.2, v38.Y + ch * 4.8);
            //下端尺口
            Vector2 v40 = new Vector2(v38.X + (cl / 2.6) * Math.Sin(epsr), v38.Y + cl / 2 * Math.Sin(epsr));
            Vector2 v41 = new Vector2(v40.X + ch * 1.1, v40.Y + cl / 3.2);
            Vector2 v42 = new Vector2(v41.X, v41.Y + (cl - cl / 3.2 - cl / 2) * 3);
            Vector2 v43 = new Vector2(v40.X + cl / 3.6, v42.Y + cl / 3.2);
            //
            Vector2 v44 = new Vector2(v38.X - cl * 1.2, v38.Y + cl / 1.4);
            Vector2 v45 = new Vector2(v25.X, v25.Y + cl * 1.2);
            //
            Vector2 v46 = new Vector2(v30.X - ch * 2.08, v30.Y - ch * 1.28);
            Vector2 v47 = new Vector2(v39.X - ch * 2.6, v39.Y + ch * 1.6);
            //
            Vector2 v48 = new Vector2(v30.X + (cl / 2.6) * Math.Sin(epsr), v30.Y - cl / 2 * Math.Sin(epsr));
            Vector2 v49 = new Vector2(v48.X - cl / 4, v48.Y - ch * 1.7);
            Vector2 v50 = new Vector2(v49.X + (cl - cl / 3.2 - cl / 2) * 3, v49.Y - (cl - cl / 3.2 - cl / 2) * 3 / 2);
            Vector2 v51 = new Vector2(v50.X + cl / 2.6, v50.Y + cl / 2.3);
            //
            Vector2 v52 = new Vector2(v38.X - (cl * 2.74) * 1.7, v38.Y + ch * 3.6);
            //线段
            //主视图
            //Vector2[] Line1 = { v1, v2 };
            //fun.drawBLine(dxf, Line1, 0.15, contour);
            //Vector2[] Line2 = { v4, v2 };
            //fun.drawBLine(dxf, Line2, 0.15, contour);
            //Vector2[] Line3 = { v1, v3 };
            //fun.drawBLine(dxf, Line3, 0.15, contour);
            //Vector2[] Line4 = { v4, v3 };
            //fun.drawBLine(dxf, Line4, 0.15, contour);
            //Vector2[] Line5 = { v5, v3 };
            //fun.drawBLine(dxf, Line5, 0.15, contour);
            //LwPolyline Arc1 = new LwPolyline();
            //Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            //Arc1.Vertexes.Add(new LwPolylineVertex(v6));
            //Arc1.Vertexes[0].Bulge = -l / 10;
            //fun.PolyFill(dxf, Arc1, 0.15, contour);
            //Vector2[] Line6 = { v6, v7 };
            //fun.drawBLine(dxf, Line6, 0.15, contour);
            //Vector2[] Line7 = { v8, v7 };
            //fun.drawBLine(dxf, Line7, 0.15, contour);
            //Vector2[] Line8 = { v8, v9 };
            //fun.drawBLine(dxf, Line8, 0.15, contour);
            //Vector2[] Line9 = { v8, v10 };
            //fun.drawBLine(dxf, Line9, 0.15, contour);
            //Vector2[] Line10 = { v4, v11 };
            //fun.drawBLine(dxf, Line10, 0.15, contour);
            //Vector2[] Line11 = { v10, v11 };
            //fun.drawBLine(dxf, Line11, 0.15, contour);
            //Vector2[] Line12 = { v10, v13 };
            //fun.drawBLine(dxf, Line12, 0.15, contour);
            //Vector2[] Line13 = { v9, v13 };
            //fun.drawBLine(dxf, Line13, 0.15, contour);
            //Vector2[] Line14 = { v14, v13 };
            //fun.drawBLine(dxf, Line14, 0.15, contour);
            //Vector2[] Line15 = { v15, v11 };
            //fun.drawBLine(dxf, Line15, 0.15, contour);
            //Vector2[] Line16 = { v15, v16 };
            //fun.drawBLine(dxf, Line16, 0.15, contour);
            //Vector2[] Line17 = { v17, v16 };
            //fun.drawBLine(dxf, Line17, 0.15, contour);
            //Vector2[] Line18 = { v19, v18 };
            //fun.drawBLine(dxf, Line18, 0.15, contour);
            //Vector2[] Line19 = { v20, v21 };
            //fun.drawBLine(dxf, Line19, 0.15, contour);
            ////内切削面
            //Vector2[] Line20 = { v23, v24 };
            //fun.drawBLine(dxf, Line20, 0.15, contour);
            ////切线
            //Vector2[] Line21 = { v25, v26 };
            //fun.drawBLine(dxf, Line21, 0.15, contour);
            ////切上
            //Vector2[] Line22 = { v27, v26 };
            //fun.drawBLine(dxf, Line22, 0.08, skdimensioning);
            //Vector2[] Line23 = { v26, v28 };
            //fun.drawBLine(dxf, Line23, 0.15, contour);
            ////zou
            //Vector2[] Line24 = { v27, v29 };
            //fun.drawBLine(dxf, Line24, 0.08, skdimensioning);
            //Vector2[] Line25 = { v29, v30 };
            //fun.drawBLine(dxf, Line25, 0.15, contour);
            ////右尺口
            //Vector2[] Line26 = { v28, v31 };
            //fun.drawBLine(dxf, Line26, 0.15, contour);
            //LwPolyline Arc2 = new LwPolyline();
            //Arc2.Vertexes.Add(new LwPolylineVertex(v32));
            //Arc2.Vertexes.Add(new LwPolylineVertex(v31));
            //Arc2.Vertexes[0].Bulge = -r * 4.6;
            //fun.PolyFill(dxf, Arc2, 0.15, contour);
            //Vector2[] Line27 = { v33, v32 };
            //fun.drawBLine(dxf, Line27, 0.15, contour);
            //Vector2[] Line28 = { v33, v29 };
            //fun.drawBLine(dxf, Line28, 0.15, contour);
            //Vector2[] Line29 = { v34, v35 };
            //fun.drawBLine(dxf, Line29, 0.15, contour);
            ////下半部分
            //Vector2[] Line30 = { v25, v36 };
            //fun.drawBLine(dxf, Line30, 0.15, contour);
            //Vector2[] Line31 = { v37, v36 };
            //fun.drawBLine(dxf, Line31, 0.08, skdimensioning);
            ////下端斜线
            //Vector2[] Line32 = { v37, v38 };
            //fun.drawBLine(dxf, Line32, 0.08, skdimensioning);
            ////Vector2[] Line33 = { v38, v39 };
            ////fun.drawBLine(dxf, Line33, 0.15, contour);
            ////下端尺口
            //Vector2[] Line34 = { v38, v40 };
            //fun.drawBLine(dxf, Line34, 0.15, contour);
            //Vector2[] Line35 = { v41, v40 };
            //fun.drawBLine(dxf, Line35, 0.15, contour);
            //LwPolyline Arc3 = new LwPolyline();
            //Arc3.Vertexes.Add(new LwPolylineVertex(v42));
            //Arc3.Vertexes.Add(new LwPolylineVertex(v41));
            //Arc3.Vertexes[0].Bulge = -r * 4.6;
            //fun.PolyFill(dxf, Arc3, 0.15, contour);
            //Vector2[] Line36 = { v43, v42 };
            //fun.drawBLine(dxf, Line36, 0.15, contour);
            //Vector2[] Line37 = { v43, v36 };
            //fun.drawBLine(dxf, Line37, 0.15, contour);
            ////
            //Vector2[] Line38 = { v44, v45 };
            //fun.drawBLine(dxf, Line38, 0.15, contour);
            ////
            //Vector2[] Line39 = { v30, v46 };
            //fun.drawBLine(dxf, Line39, 0.08, skdimensioning);
            //Vector2[] Line40 = { v39, v47 };
            //fun.drawBLine(dxf, Line40, 0.08, skdimensioning);
            //Arc arc1 = fun.DrawArc(v32, new Vector2(v32.X - 6, v32.Y + 5), v32);
            //Arc arc2 = fun.DrawArc(v22, new Vector2(v22.X - 2, v22.Y - 10), v22);
            ////
            //Vector2[] Line41 = { v30, v48 };
            //fun.drawBLine(dxf, Line41, 0.15, contour);
            //Vector2[] Line42 = { v49, v48 };
            //fun.drawBLine(dxf, Line42, 0.15, contour);
            //LwPolyline Arc4 = new LwPolyline();
            //Arc4.Vertexes.Add(new LwPolylineVertex(v49));
            //Arc4.Vertexes.Add(new LwPolylineVertex(v50));
            //Arc4.Vertexes[0].Bulge = r * 4.6;
            //fun.PolyFill(dxf, Arc4, 0.15, contour);
            //Vector2[] Line43 = { v50, v51 };
            //fun.drawBLine(dxf, Line43, 0.15, contour);
            ////
            //Vector2[] Line44 = { v38, v52 };
            //fun.drawBLine(dxf, Line44, 0.15, contour);
            //Vector2[] Line45 = { v51, v52 };
            //fun.drawBLine(dxf, Line45, 0.15, contour);
            ////
            //Vector2[] Line46 = { v47, v52 };
            //fun.drawBLine(dxf, Line46, 0.08, skdimensioning);
            ////
            //LwPolyline poly = new LwPolyline();
            //poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 3)));
            //poly.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, Math.PI, fai / 3)));
            //poly.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 3)));
            //fun.PolyFill(dxf, poly, 0.15, contour);
            //LwPolyline poly1 = new LwPolyline();
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, h / 7.5)));
            //poly1.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, Math.PI, h / 7.5)));
            //poly1.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, h / 7.5)));
            //fun.PolyFill(dxf, poly1, 0.15, contour);
            //LwPolyline poly2 = new LwPolyline();
            //poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 2)));
            //poly2.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, Math.PI, fai / 2)));
            //poly2.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 2)));
            //fun.PolyFill(dxf, poly2, 0.08, refin);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v22.X - fai / 2 - 1, v22.Y), new Vector2(v22.X + fai / 2 + 1, v22.Y) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v22.X, v22.Y + fai / 2 + 1), new Vector2(v22.X, v22.Y - fai / 2 - 1) }, centre, Linetype.Center);
            ////
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v20.X - l / 6, v20.Y + (fai / 2) * 1.1), new Vector2(v21.X + l / 25, v21.Y + (fai / 2) * 1.1) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v20.X - l / 6, v20.Y + (fai / 2) / 4), new Vector2(v21.X + l / 25, v21.Y + (fai / 2) / 4) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v20.X - l / 6, v20.Y + (fai / 2) / 1.47), new Vector2(v21.X + l / 25, v21.Y + (fai / 2) / 1.47) }, centre, Linetype.Center);
            //
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 1;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 0.8;
            double offset = 6;
            LinearDimension dim1 = new LinearDimension(new Line(v1, v2), offset, 360, dimensionStyle);
            dim1.UserText = "3.5 ";
            dxf.AddEntity(dim1);
            LinearDimension dim2 = new LinearDimension(new Line(v10, v11), offset, 180, dimensionStyle);
            dim2.UserText = "3.63 ";
            dxf.AddEntity(dim2);
            //
            //LinearDimension dim3 = new LinearDimension(new Line(v27, v37), offset * 2, 270, dimensionStyle);
            //dim3.UserText = "16.5 ";
            //dxf.AddEntity(dim3);
            //LinearDimension dim4 = new LinearDimension(new Line(v27, v31), offset * 1.2, 270, dimensionStyle);
            //dim4.UserText = "1.12 ";
            //dxf.AddEntity(dim4);
            //LinearDimension dim5 = new LinearDimension(new Line(v27, v31), offset * 1.2, 360, dimensionStyle);
            //dim5.UserText = "1.5 ";
            //dxf.AddEntity(dim5);
            ////
            //RadialDimension dimrad1 = new RadialDimension(arc1, -36, 1, dimensionStyle);
            //dimrad1.UserText = "R0.14";
            //dxf.AddEntity(dimrad1);
            ////
            //RadialDimension dimrad2 = new RadialDimension(arc2, 79, 1, dimensionStyle);
            //dimrad2.UserText = "Φ9.52";
            //dxf.AddEntity(dimrad2);
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint60(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double l = 3.5;
            double pi = Math.PI;
            double epsr = 45 * pi / 180;
            double l2 = 3.63;
            double h = 16.5;
            double ch = 1.12;
            double cl = 1.5;
            double r = 0.14;
            double fai = 9.52;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + l, v1.Y);
            Vector2 v3 = new Vector2(v1.X + l / 8, v1.Y - l / 4);
            Vector2 v4 = new Vector2(v2.X, v1.Y - l / 4);
            //
            Vector2 v5 = new Vector2(v3.X + l / 8, v3.Y - l / 4);
            Vector2 v6 = new Vector2(v5.X - l / 8, v5.Y - l / 2);
            Vector2 v7 = new Vector2(v1.X, v6.Y - l / 10);
            Vector2 v8 = new Vector2(v7.X, v7.Y - l / 1.6);
            Vector2 v9 = new Vector2(v8.X + l / 5, v8.Y - l / 3);
            Vector2 v10 = new Vector2(v8.X, v8.Y - l * 2);
            //
            Vector2 v11 = new Vector2(v4.X, v10.Y);
            Vector2 v12 = new Vector2(v11.X, v11.Y - l / 10);
            //底上线
            Vector2 v13 = new Vector2(v10.X + l / 8, v10.Y + l / 3);
            //
            Vector2 v14 = new Vector2(v4.X, v13.Y);
            //
            Vector2 v15 = new Vector2(v11.X, v11.Y - l / 10);
            //
            Vector2 v16 = new Vector2(v15.X - l / 1.2, v15.Y);
            //
            Vector2 v17 = new Vector2(v16.X, v10.Y);
            Vector2 v18 = new Vector2(v13.X, v13.Y + l / 16);
            Vector2 v19 = new Vector2(v18.X + l / 1.16, v18.Y);
            //
            Vector2 v20 = new Vector2(v18.X + l / 20, v18.Y + l / 3);
            Vector2 v21 = new Vector2(v4.X, v20.Y);
            //旋转三角刀片
            Vector2 v22 = new Vector2(v1.X + h * 2, v1.Y - h / 2.2);
            //切削面
            Vector2 v23 = new Vector2(v22.X - h / 14, v22.Y - fai / 2);
            Vector2 v24 = new Vector2(v22.X - fai / 1.76, v22.Y + h / 6.9);
            //切线you
            Vector2 v25 = new Vector2(v22.X + fai / 2, v22.Y);
            Vector2 v26 = new Vector2(v25.X, v25.Y + h / 2 - ch * 2);
            //
            Vector2 v27 = new Vector2(v26.X, v26.Y + ch * 2);
            Vector2 v28 = new Vector2(v26.X - cl / 2, v26.Y);
            //zuo
            Vector2 v29 = new Vector2(v27.X - cl * 2.7, v26.Y);
            Vector2 v30 = new Vector2(v29.X - (cl * 2.74) * 1.86, v29.Y - ch * 4.06);
            //切线右尺口
            Vector2 v31 = new Vector2(v28.X - cl / 3.2, v28.Y + ch / 1.3);
            Vector2 v32 = new Vector2(v31.X - (cl - cl / 3.2 - cl / 2) * 3, v31.Y);
            Vector2 v33 = new Vector2(v32.X - cl / 3.2, v28.Y);
            //上侧横线
            Vector2 v34 = new Vector2(v25.X, v25.Y + h / 2 - ch * 4.2);
            Vector2 v35 = new Vector2(v34.X - fai / 1.2, v34.Y);
            //下部分端口
            Vector2 v36 = new Vector2(v25.X, v25.Y - h / 2 + ch * 5.2);
            Vector2 v37 = new Vector2(v36.X, v36.Y - ch * 5.2);
            //下端斜线
            Vector2 v38 = new Vector2(v32.X, v37.Y + ch);
            Vector2 v39 = new Vector2(v38.X - (cl * 2.74) * 2.2, v38.Y + ch * 4.8);
            //下端尺口
            Vector2 v40 = new Vector2(v38.X + (cl / 2.6) * Math.Sin(epsr), v38.Y + cl / 2 * Math.Sin(epsr));
            Vector2 v41 = new Vector2(v40.X + ch * 1.1, v40.Y + cl / 3.2);
            Vector2 v42 = new Vector2(v41.X, v41.Y + (cl - cl / 3.2 - cl / 2) * 3);
            Vector2 v43 = new Vector2(v40.X + cl / 3.6, v42.Y + cl / 3.2);
            //
            Vector2 v44 = new Vector2(v38.X - cl * 1.2, v38.Y + cl / 1.4);
            Vector2 v45 = new Vector2(v25.X, v25.Y + cl * 1.2);
            //
            Vector2 v46 = new Vector2(v30.X - ch * 2.08, v30.Y - ch * 1.28);
            Vector2 v47 = new Vector2(v39.X - ch * 2.6, v39.Y + ch * 1.6);
            //
            Vector2 v48 = new Vector2(v30.X + (cl / 2.6) * Math.Sin(epsr), v30.Y - cl / 2 * Math.Sin(epsr));
            Vector2 v49 = new Vector2(v48.X - cl / 4, v48.Y - ch * 1.7);
            Vector2 v50 = new Vector2(v49.X + (cl - cl / 3.2 - cl / 2) * 3, v49.Y - (cl - cl / 3.2 - cl / 2) * 3 / 2);
            Vector2 v51 = new Vector2(v50.X + cl / 2.6, v50.Y + cl / 2.3);
            //
            Vector2 v52 = new Vector2(v38.X - (cl * 2.74) * 1.7, v38.Y + ch * 3.6);
            //线段
            //主视图
            //Vector2[] Line1 = { v1, v2 };
            //fun.drawBLine(dxf, Line1, 0.15, contour);
            //Vector2[] Line2 = { v4, v2 };
            //fun.drawBLine(dxf, Line2, 0.15, contour);
            //Vector2[] Line3 = { v1, v3 };
            //fun.drawBLine(dxf, Line3, 0.15, contour);
            //Vector2[] Line4 = { v4, v3 };
            //fun.drawBLine(dxf, Line4, 0.15, contour);
            //Vector2[] Line5 = { v5, v3 };
            //fun.drawBLine(dxf, Line5, 0.15, contour);
            //LwPolyline Arc1 = new LwPolyline();
            //Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            //Arc1.Vertexes.Add(new LwPolylineVertex(v6));
            //Arc1.Vertexes[0].Bulge = -l / 10;
            //fun.PolyFill(dxf, Arc1, 0.15, contour);
            //Vector2[] Line6 = { v6, v7 };
            //fun.drawBLine(dxf, Line6, 0.15, contour);
            //Vector2[] Line7 = { v8, v7 };
            //fun.drawBLine(dxf, Line7, 0.15, contour);
            //Vector2[] Line8 = { v8, v9 };
            //fun.drawBLine(dxf, Line8, 0.15, contour);
            //Vector2[] Line9 = { v8, v10 };
            //fun.drawBLine(dxf, Line9, 0.15, contour);
            //Vector2[] Line10 = { v4, v11 };
            //fun.drawBLine(dxf, Line10, 0.15, contour);
            //Vector2[] Line11 = { v10, v11 };
            //fun.drawBLine(dxf, Line11, 0.15, contour);
            //Vector2[] Line12 = { v10, v13 };
            //fun.drawBLine(dxf, Line12, 0.15, contour);
            //Vector2[] Line13 = { v9, v13 };
            //fun.drawBLine(dxf, Line13, 0.15, contour);
            //Vector2[] Line14 = { v14, v13 };
            //fun.drawBLine(dxf, Line14, 0.15, contour);
            //Vector2[] Line15 = { v15, v11 };
            //fun.drawBLine(dxf, Line15, 0.15, contour);
            //Vector2[] Line16 = { v15, v16 };
            //fun.drawBLine(dxf, Line16, 0.15, contour);
            //Vector2[] Line17 = { v17, v16 };
            //fun.drawBLine(dxf, Line17, 0.15, contour);
            //Vector2[] Line18 = { v19, v18 };
            //fun.drawBLine(dxf, Line18, 0.15, contour);
            //Vector2[] Line19 = { v20, v21 };
            //fun.drawBLine(dxf, Line19, 0.15, contour);
            ////内切削面
            //Vector2[] Line20 = { v23, v24 };
            //fun.drawBLine(dxf, Line20, 0.15, contour);
            ////切线
            //Vector2[] Line21 = { v25, v26 };
            //fun.drawBLine(dxf, Line21, 0.15, contour);
            ////切上
            //Vector2[] Line22 = { v27, v26 };
            //fun.drawBLine(dxf, Line22, 0.08, skdimensioning);
            //Vector2[] Line23 = { v26, v28 };
            //fun.drawBLine(dxf, Line23, 0.15, contour);
            ////zou
            //Vector2[] Line24 = { v27, v29 };
            //fun.drawBLine(dxf, Line24, 0.08, skdimensioning);
            //Vector2[] Line25 = { v29, v30 };
            //fun.drawBLine(dxf, Line25, 0.15, contour);
            ////右尺口
            //Vector2[] Line26 = { v28, v31 };
            //fun.drawBLine(dxf, Line26, 0.15, contour);
            //LwPolyline Arc2 = new LwPolyline();
            //Arc2.Vertexes.Add(new LwPolylineVertex(v32));
            //Arc2.Vertexes.Add(new LwPolylineVertex(v31));
            //Arc2.Vertexes[0].Bulge = -r * 4.6;
            //fun.PolyFill(dxf, Arc2, 0.15, contour);
            //Vector2[] Line27 = { v33, v32 };
            //fun.drawBLine(dxf, Line27, 0.15, contour);
            //Vector2[] Line28 = { v33, v29 };
            //fun.drawBLine(dxf, Line28, 0.15, contour);
            //Vector2[] Line29 = { v34, v35 };
            //fun.drawBLine(dxf, Line29, 0.15, contour);
            ////下半部分
            //Vector2[] Line30 = { v25, v36 };
            //fun.drawBLine(dxf, Line30, 0.15, contour);
            //Vector2[] Line31 = { v37, v36 };
            //fun.drawBLine(dxf, Line31, 0.08, skdimensioning);
            ////下端斜线
            //Vector2[] Line32 = { v37, v38 };
            //fun.drawBLine(dxf, Line32, 0.08, skdimensioning);
            ////Vector2[] Line33 = { v38, v39 };
            ////fun.drawBLine(dxf, Line33, 0.15, contour);
            ////下端尺口
            //Vector2[] Line34 = { v38, v40 };
            //fun.drawBLine(dxf, Line34, 0.15, contour);
            //Vector2[] Line35 = { v41, v40 };
            //fun.drawBLine(dxf, Line35, 0.15, contour);
            //LwPolyline Arc3 = new LwPolyline();
            //Arc3.Vertexes.Add(new LwPolylineVertex(v42));
            //Arc3.Vertexes.Add(new LwPolylineVertex(v41));
            //Arc3.Vertexes[0].Bulge = -r * 4.6;
            //fun.PolyFill(dxf, Arc3, 0.15, contour);
            //Vector2[] Line36 = { v43, v42 };
            //fun.drawBLine(dxf, Line36, 0.15, contour);
            //Vector2[] Line37 = { v43, v36 };
            //fun.drawBLine(dxf, Line37, 0.15, contour);
            ////
            //Vector2[] Line38 = { v44, v45 };
            //fun.drawBLine(dxf, Line38, 0.15, contour);
            ////
            //Vector2[] Line39 = { v30, v46 };
            //fun.drawBLine(dxf, Line39, 0.08, skdimensioning);
            //Vector2[] Line40 = { v39, v47 };
            //fun.drawBLine(dxf, Line40, 0.08, skdimensioning);
            //Arc arc1 = fun.DrawArc(v32, new Vector2(v32.X - 6, v32.Y + 5), v32);
            //Arc arc2 = fun.DrawArc(v22, new Vector2(v22.X - 2, v22.Y - 10), v22);
            ////
            //Vector2[] Line41 = { v30, v48 };
            //fun.drawBLine(dxf, Line41, 0.15, contour);
            //Vector2[] Line42 = { v49, v48 };
            //fun.drawBLine(dxf, Line42, 0.15, contour);
            //LwPolyline Arc4 = new LwPolyline();
            //Arc4.Vertexes.Add(new LwPolylineVertex(v49));
            //Arc4.Vertexes.Add(new LwPolylineVertex(v50));
            //Arc4.Vertexes[0].Bulge = r * 4.6;
            //fun.PolyFill(dxf, Arc4, 0.15, contour);
            //Vector2[] Line43 = { v50, v51 };
            //fun.drawBLine(dxf, Line43, 0.15, contour);
            ////
            //Vector2[] Line44 = { v38, v52 };
            //fun.drawBLine(dxf, Line44, 0.15, contour);
            //Vector2[] Line45 = { v51, v52 };
            //fun.drawBLine(dxf, Line45, 0.15, contour);
            ////
            //Vector2[] Line46 = { v47, v52 };
            //fun.drawBLine(dxf, Line46, 0.08, skdimensioning);
            ////
            //LwPolyline poly = new LwPolyline();
            //poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 3)));
            //poly.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, Math.PI, fai / 3)));
            //poly.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 3)));
            //fun.PolyFill(dxf, poly, 0.15, contour);
            //LwPolyline poly1 = new LwPolyline();
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, h / 7.5)));
            //poly1.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, Math.PI, h / 7.5)));
            //poly1.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, h / 7.5)));
            //fun.PolyFill(dxf, poly1, 0.15, contour);
            //LwPolyline poly2 = new LwPolyline();
            //poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 2)));
            //poly2.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, Math.PI, fai / 2)));
            //poly2.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 2)));
            //fun.PolyFill(dxf, poly2, 0.08, refin);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v22.X - fai / 2 - 1, v22.Y), new Vector2(v22.X + fai / 2 + 1, v22.Y) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v22.X, v22.Y + fai / 2 + 1), new Vector2(v22.X, v22.Y - fai / 2 - 1) }, centre, Linetype.Center);
            //
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v20.X - l / 6, v20.Y + (fai / 2) * 1.1), new Vector2(v21.X + l / 25, v21.Y + (fai / 2) * 1.1) },0.25, centre, Linetype.Center);
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v20.X - l / 6, v20.Y + (fai / 2) / 4), new Vector2(v21.X + l / 25, v21.Y + (fai / 2) / 4) }, 0.25,centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v20.X - l / 6, v20.Y + (fai / 2) / 1.47), new Vector2(v21.X + l / 25, v21.Y + (fai / 2) / 1.47) }, centre, Linetype.Center);
            //
            //DimensionStyle dimensionStyle = fun.CreateDimStyle();
            //dimensionStyle.ArrowSize = 1;
            //dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.TextHeight = 0.8;
            //double offset = 6;
            //LinearDimension dim1 = new LinearDimension(new Line(v1, v2), offset, 360, dimensionStyle);
            //dim1.UserText = "3.5 ";
            //dxf.AddEntity(dim1);
            //LinearDimension dim2 = new LinearDimension(new Line(v10, v11), offset, 180, dimensionStyle);
            //dim2.UserText = "3.63 ";
            //dxf.AddEntity(dim2);
            ////
            //LinearDimension dim3 = new LinearDimension(new Line(v27, v37), offset * 2, 270, dimensionStyle);
            //dim3.UserText = "16.5 ";
            //dxf.AddEntity(dim3);
            //LinearDimension dim4 = new LinearDimension(new Line(v27, v31), offset * 1.2, 270, dimensionStyle);
            //dim4.UserText = "1.12 ";
            //dxf.AddEntity(dim4);
            //LinearDimension dim5 = new LinearDimension(new Line(v27, v31), offset * 1.2, 360, dimensionStyle);
            //dim5.UserText = "1.5 ";
            //dxf.AddEntity(dim5);
            ////
            //RadialDimension dimrad1 = new RadialDimension(arc1, -36, 1, dimensionStyle);
            //dimrad1.UserText = "R0.14";
            //dxf.AddEntity(dimrad1);
            ////
            //RadialDimension dimrad2 = new RadialDimension(arc2, 79, 1, dimensionStyle);
            //dimrad2.UserText = "Φ9.52";
            //dxf.AddEntity(dimrad2);
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        public static void Matingpoint61(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double l = 3.5;
            double pi = Math.PI;
            double epsr = 45 * pi / 180;
            double l2 = 3.63;
            double h = 16.5;
            double ch = 1.12;
            double cl = 1.5;
            double r = 0.14;
            double fai = 9.52;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + l, v1.Y);
            Vector2 v3 = new Vector2(v1.X + l / 8, v1.Y - l / 4);
            Vector2 v4 = new Vector2(v2.X, v1.Y - l / 4);
            //
            Vector2 v5 = new Vector2(v3.X + l / 8, v3.Y - l / 4);
            Vector2 v6 = new Vector2(v5.X - l / 8, v5.Y - l / 2);
            Vector2 v7 = new Vector2(v1.X, v6.Y - l / 10);
            Vector2 v8 = new Vector2(v7.X, v7.Y - l / 1.6);
            Vector2 v9 = new Vector2(v8.X + l / 5, v8.Y - l / 3);
            Vector2 v10 = new Vector2(v8.X, v8.Y - l * 2);
            //
            Vector2 v11 = new Vector2(v4.X, v10.Y);
            Vector2 v12 = new Vector2(v11.X, v11.Y - l / 10);
            //底上线
            Vector2 v13 = new Vector2(v10.X + l / 8, v10.Y + l / 3);
            //
            Vector2 v14 = new Vector2(v4.X, v13.Y);
            //
            Vector2 v15 = new Vector2(v11.X, v11.Y - l / 10);
            //
            Vector2 v16 = new Vector2(v15.X - l / 1.2, v15.Y);
            //
            Vector2 v17 = new Vector2(v16.X, v10.Y);
            Vector2 v18 = new Vector2(v13.X, v13.Y + l / 16);
            Vector2 v19 = new Vector2(v18.X + l / 1.16, v18.Y);
            //
            Vector2 v20 = new Vector2(v18.X + l / 20, v18.Y + l / 3);
            Vector2 v21 = new Vector2(v4.X, v20.Y);
            //旋转三角刀片
            Vector2 v22 = new Vector2(v1.X + h * 2, v1.Y - h / 2.2);
            //切削面
            Vector2 v23 = new Vector2(v22.X - h / 14, v22.Y - fai / 2);
            Vector2 v24 = new Vector2(v22.X - fai / 1.76, v22.Y + h / 6.9);
            //切线you
            Vector2 v25 = new Vector2(v22.X + fai / 2, v22.Y);
            Vector2 v26 = new Vector2(v25.X, v25.Y + h / 2 - ch * 2);
            //
            Vector2 v27 = new Vector2(v26.X, v26.Y + ch * 2);
            Vector2 v28 = new Vector2(v26.X - cl / 2, v26.Y);
            //zuo
            Vector2 v29 = new Vector2(v27.X - cl * 2.7, v26.Y);
            Vector2 v30 = new Vector2(v29.X - (cl * 2.74) * 1.86, v29.Y - ch * 4.06);
            //切线右尺口
            Vector2 v31 = new Vector2(v28.X - cl / 3.2, v28.Y + ch / 1.3);
            Vector2 v32 = new Vector2(v31.X - (cl - cl / 3.2 - cl / 2) * 3, v31.Y);
            Vector2 v33 = new Vector2(v32.X - cl / 3.2, v28.Y);
            //上侧横线
            Vector2 v34 = new Vector2(v25.X, v25.Y + h / 2 - ch * 4.2);
            Vector2 v35 = new Vector2(v34.X - fai / 1.2, v34.Y);
            //下部分端口
            Vector2 v36 = new Vector2(v25.X, v25.Y - h / 2 + ch * 5.2);
            Vector2 v37 = new Vector2(v36.X, v36.Y - ch * 5.2);
            //下端斜线
            Vector2 v38 = new Vector2(v32.X, v37.Y + ch);
            Vector2 v39 = new Vector2(v38.X - (cl * 2.74) * 2.2, v38.Y + ch * 4.8);
            //下端尺口
            Vector2 v40 = new Vector2(v38.X + (cl / 2.6) * Math.Sin(epsr), v38.Y + cl / 2 * Math.Sin(epsr));
            Vector2 v41 = new Vector2(v40.X + ch * 1.1, v40.Y + cl / 3.2);
            Vector2 v42 = new Vector2(v41.X, v41.Y + (cl - cl / 3.2 - cl / 2) * 3);
            Vector2 v43 = new Vector2(v40.X + cl / 3.6, v42.Y + cl / 3.2);
            //
            Vector2 v44 = new Vector2(v38.X - cl * 1.2, v38.Y + cl / 1.4);
            Vector2 v45 = new Vector2(v25.X, v25.Y + cl * 1.2);
            //
            Vector2 v46 = new Vector2(v30.X - ch * 2.08, v30.Y - ch * 1.28);
            Vector2 v47 = new Vector2(v39.X - ch * 2.6, v39.Y + ch * 1.6);
            //
            Vector2 v48 = new Vector2(v30.X + (cl / 2.6) * Math.Sin(epsr), v30.Y - cl / 2 * Math.Sin(epsr));
            Vector2 v49 = new Vector2(v48.X - cl / 4, v48.Y - ch * 1.7);
            Vector2 v50 = new Vector2(v49.X + (cl - cl / 3.2 - cl / 2) * 3, v49.Y - (cl - cl / 3.2 - cl / 2) * 3 / 2);
            Vector2 v51 = new Vector2(v50.X + cl / 2.6, v50.Y + cl / 2.3);
            //
            Vector2 v52 = new Vector2(v38.X - (cl * 2.74) * 1.7, v38.Y + ch * 3.6);
            //线段
            //主视图
            //Vector2[] Line1 = { v1, v2 };
            //fun.drawBLine(dxf, Line1, 0.15, contour);
            //Vector2[] Line2 = { v4, v2 };
            //fun.drawBLine(dxf, Line2, 0.15, contour);
            //Vector2[] Line3 = { v1, v3 };
            //fun.drawBLine(dxf, Line3, 0.15, contour);
            //Vector2[] Line4 = { v4, v3 };
            //fun.drawBLine(dxf, Line4, 0.15, contour);
            //Vector2[] Line5 = { v5, v3 };
            //fun.drawBLine(dxf, Line5, 0.15, contour);
            //LwPolyline Arc1 = new LwPolyline();
            //Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            //Arc1.Vertexes.Add(new LwPolylineVertex(v6));
            //Arc1.Vertexes[0].Bulge = -l / 10;
            //fun.PolyFill(dxf, Arc1, 0.15, contour);
            //Vector2[] Line6 = { v6, v7 };
            //fun.drawBLine(dxf, Line6, 0.15, contour);
            //Vector2[] Line7 = { v8, v7 };
            //fun.drawBLine(dxf, Line7, 0.15, contour);
            //Vector2[] Line8 = { v8, v9 };
            //fun.drawBLine(dxf, Line8, 0.15, contour);
            //Vector2[] Line9 = { v8, v10 };
            //fun.drawBLine(dxf, Line9, 0.15, contour);
            //Vector2[] Line10 = { v4, v11 };
            //fun.drawBLine(dxf, Line10, 0.15, contour);
            //Vector2[] Line11 = { v10, v11 };
            //fun.drawBLine(dxf, Line11, 0.15, contour);
            //Vector2[] Line12 = { v10, v13 };
            //fun.drawBLine(dxf, Line12, 0.15, contour);
            //Vector2[] Line13 = { v9, v13 };
            //fun.drawBLine(dxf, Line13, 0.15, contour);
            //Vector2[] Line14 = { v14, v13 };
            //fun.drawBLine(dxf, Line14, 0.15, contour);
            //Vector2[] Line15 = { v15, v11 };
            //fun.drawBLine(dxf, Line15, 0.15, contour);
            //Vector2[] Line16 = { v15, v16 };
            //fun.drawBLine(dxf, Line16, 0.15, contour);
            //Vector2[] Line17 = { v17, v16 };
            //fun.drawBLine(dxf, Line17, 0.15, contour);
            //Vector2[] Line18 = { v19, v18 };
            //fun.drawBLine(dxf, Line18, 0.15, contour);
            //Vector2[] Line19 = { v20, v21 };
            //fun.drawBLine(dxf, Line19, 0.15, contour);
            ////内切削面
            //Vector2[] Line20 = { v23, v24 };
            //fun.drawBLine(dxf, Line20, 0.15, contour);
            ////切线
            //Vector2[] Line21 = { v25, v26 };
            //fun.drawBLine(dxf, Line21, 0.15, contour);
            ////切上
            //Vector2[] Line22 = { v27, v26 };
            //fun.drawBLine(dxf, Line22, 0.08, skdimensioning);
            //Vector2[] Line23 = { v26, v28 };
            //fun.drawBLine(dxf, Line23, 0.15, contour);
            ////zou
            //Vector2[] Line24 = { v27, v29 };
            //fun.drawBLine(dxf, Line24, 0.08, skdimensioning);
            //Vector2[] Line25 = { v29, v30 };
            //fun.drawBLine(dxf, Line25, 0.15, contour);
            ////右尺口
            //Vector2[] Line26 = { v28, v31 };
            //fun.drawBLine(dxf, Line26, 0.15, contour);
            //LwPolyline Arc2 = new LwPolyline();
            //Arc2.Vertexes.Add(new LwPolylineVertex(v32));
            //Arc2.Vertexes.Add(new LwPolylineVertex(v31));
            //Arc2.Vertexes[0].Bulge = -r * 4.6;
            //fun.PolyFill(dxf, Arc2, 0.15, contour);
            //Vector2[] Line27 = { v33, v32 };
            //fun.drawBLine(dxf, Line27, 0.15, contour);
            //Vector2[] Line28 = { v33, v29 };
            //fun.drawBLine(dxf, Line28, 0.15, contour);
            //Vector2[] Line29 = { v34, v35 };
            //fun.drawBLine(dxf, Line29, 0.15, contour);
            ////下半部分
            //Vector2[] Line30 = { v25, v36 };
            //fun.drawBLine(dxf, Line30, 0.15, contour);
            //Vector2[] Line31 = { v37, v36 };
            //fun.drawBLine(dxf, Line31, 0.08, skdimensioning);
            ////下端斜线
            //Vector2[] Line32 = { v37, v38 };
            //fun.drawBLine(dxf, Line32, 0.08, skdimensioning);
            ////Vector2[] Line33 = { v38, v39 };
            ////fun.drawBLine(dxf, Line33, 0.15, contour);
            ////下端尺口
            //Vector2[] Line34 = { v38, v40 };
            //fun.drawBLine(dxf, Line34, 0.15, contour);
            //Vector2[] Line35 = { v41, v40 };
            //fun.drawBLine(dxf, Line35, 0.15, contour);
            //LwPolyline Arc3 = new LwPolyline();
            //Arc3.Vertexes.Add(new LwPolylineVertex(v42));
            //Arc3.Vertexes.Add(new LwPolylineVertex(v41));
            //Arc3.Vertexes[0].Bulge = -r * 4.6;
            //fun.PolyFill(dxf, Arc3, 0.15, contour);
            //Vector2[] Line36 = { v43, v42 };
            //fun.drawBLine(dxf, Line36, 0.15, contour);
            //Vector2[] Line37 = { v43, v36 };
            //fun.drawBLine(dxf, Line37, 0.15, contour);
            ////
            //Vector2[] Line38 = { v44, v45 };
            //fun.drawBLine(dxf, Line38, 0.15, contour);
            ////
            //Vector2[] Line39 = { v30, v46 };
            //fun.drawBLine(dxf, Line39, 0.08, skdimensioning);
            //Vector2[] Line40 = { v39, v47 };
            //fun.drawBLine(dxf, Line40, 0.08, skdimensioning);
            //Arc arc1 = fun.DrawArc(v32, new Vector2(v32.X - 6, v32.Y + 5), v32);
            //Arc arc2 = fun.DrawArc(v22, new Vector2(v22.X - 2, v22.Y - 10), v22);
            ////
            //Vector2[] Line41 = { v30, v48 };
            //fun.drawBLine(dxf, Line41, 0.15, contour);
            //Vector2[] Line42 = { v49, v48 };
            //fun.drawBLine(dxf, Line42, 0.15, contour);
            //LwPolyline Arc4 = new LwPolyline();
            //Arc4.Vertexes.Add(new LwPolylineVertex(v49));
            //Arc4.Vertexes.Add(new LwPolylineVertex(v50));
            //Arc4.Vertexes[0].Bulge = r * 4.6;
            //fun.PolyFill(dxf, Arc4, 0.15, contour);
            //Vector2[] Line43 = { v50, v51 };
            //fun.drawBLine(dxf, Line43, 0.15, contour);
            ////
            //Vector2[] Line44 = { v38, v52 };
            //fun.drawBLine(dxf, Line44, 0.15, contour);
            //Vector2[] Line45 = { v51, v52 };
            //fun.drawBLine(dxf, Line45, 0.15, contour);
            ////
            //Vector2[] Line46 = { v47, v52 };
            //fun.drawBLine(dxf, Line46, 0.08, skdimensioning);
            ////
            //LwPolyline poly = new LwPolyline();
            //poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 3)));
            //poly.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, Math.PI, fai / 3)));
            //poly.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 3)));
            //fun.PolyFill(dxf, poly, 0.15, contour);
            //LwPolyline poly1 = new LwPolyline();
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, h / 7.5)));
            //poly1.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, Math.PI, h / 7.5)));
            //poly1.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, h / 7.5)));
            //fun.PolyFill(dxf, poly1, 0.15, contour);
            //LwPolyline poly2 = new LwPolyline();
            //poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 2)));
            //poly2.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            //poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, Math.PI, fai / 2)));
            //poly2.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            //poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v22, 0, fai / 2)));
            //fun.PolyFill(dxf, poly2, 0.08, refin);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v22.X - fai / 2 - 1, v22.Y), new Vector2(v22.X + fai / 2 + 1, v22.Y) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v22.X, v22.Y + fai / 2 + 1), new Vector2(v22.X, v22.Y - fai / 2 - 1) }, centre, Linetype.Center);
            ////
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v20.X - l / 6, v20.Y + (fai / 2) * 1.1), new Vector2(v21.X + l / 25, v21.Y + (fai / 2) * 1.1) }, centre, Linetype.Center);
            //fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v20.X - l / 6, v20.Y + (fai / 2) / 4), new Vector2(v21.X + l / 25, v21.Y + (fai / 2) / 4) }, centre, Linetype.Center);
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v20.X - l / 6, v20.Y + (fai / 2) / 1.47), new Vector2(v21.X + l / 25, v21.Y + (fai / 2) / 1.47) }, 0.25, centre, Linetype.Center);
            //
            //DimensionStyle dimensionStyle = fun.CreateDimStyle();
            //dimensionStyle.ArrowSize = 1;
            //dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            //dimensionStyle.TextHeight = 0.8;
            //double offset = 6;
            //LinearDimension dim1 = new LinearDimension(new Line(v1, v2), offset, 360, dimensionStyle);
            //dim1.UserText = "3.5 ";
            //dxf.AddEntity(dim1);
            //LinearDimension dim2 = new LinearDimension(new Line(v10, v11), offset, 180, dimensionStyle);
            //dim2.UserText = "3.63 ";
            //dxf.AddEntity(dim2);
            ////
            //LinearDimension dim3 = new LinearDimension(new Line(v27, v37), offset * 2, 270, dimensionStyle);
            //dim3.UserText = "16.5 ";
            //dxf.AddEntity(dim3);
            //LinearDimension dim4 = new LinearDimension(new Line(v27, v31), offset * 1.2, 270, dimensionStyle);
            //dim4.UserText = "1.12 ";
            //dxf.AddEntity(dim4);
            //LinearDimension dim5 = new LinearDimension(new Line(v27, v31), offset * 1.2, 360, dimensionStyle);
            //dim5.UserText = "1.5 ";
            //dxf.AddEntity(dim5);
            ////
            //RadialDimension dimrad1 = new RadialDimension(arc1, -36, 1, dimensionStyle);
            //dimrad1.UserText = "R0.14";
            //dxf.AddEntity(dimrad1);
            ////
            //RadialDimension dimrad2 = new RadialDimension(arc2, 79, 1, dimensionStyle);
            //dimrad2.UserText = "Φ9.52";
            //dxf.AddEntity(dimrad2);
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
        ///
        //
        //
        public static void Matingpoint88(Dictionary<string, Object> data, int width=450, int height=300, int g_Mi = 15)
        {
            int m_WidMaxCount = 0;
            int m_HigMaxCount = 0;
            //wid 600  
            m_WidMaxCount = width / g_Mi;
            m_HigMaxCount = height / g_Mi;

            Layer skdimensioning = new Layer("skdimensioning");
            DxfDocument dxf = new DxfDocument();
            Vector2 lt = new Vector2(0, 0);
            Vector2 lb = new Vector2(0, height);
            Vector2 rt = new Vector2(width, 0);
            Vector2 rb = new Vector2(width, height);

            Vector2[] LineTop = { lt, rt };
            fun.drawPlinetype(dxf, LineTop,0.1, skdimensioning, Linetype.Dashed);
            Vector2[] LineLeft = { lt, lb };
            fun.drawPlinetype(dxf, LineLeft, 0.1,skdimensioning, Linetype.Dashed);
            Vector2[] LineRight = { rt, rb };
            fun.drawPlinetype(dxf, LineRight, 0.1, skdimensioning, Linetype.Dashed);
            Vector2[] LineBottom = { lb, rb };
            fun.drawPlinetype(dxf, LineBottom, 0.1, skdimensioning, Linetype.Dashed);

            int ry = 0;
            for (int i = 0; i < m_HigMaxCount; ++i)
            {
                ry += g_Mi;
                Vector2 vec1 = new Vector2(Math.Abs(lt.X - rt.X), ry);
                Vector2 vec2 = new Vector2(0, ry);
                Vector2[] line1 = { vec1, vec2 };
                fun.drawPlinetype(dxf, line1, 0.1, skdimensioning, Linetype.Dashed);
            }
            int x = 0;
            double y = Math.Abs(lt.Y - lb.Y);
            for (int i = 0; i < m_WidMaxCount; ++i)
            {
                x += g_Mi;
                Vector2 vec1 = new Vector2(x, y);
                Vector2 vec2 = new Vector2(x, 0);
                Vector2[] line1 = { vec1, vec2 };
                fun.drawPlinetype(dxf, line1, 0.1, skdimensioning, Linetype.Dashed);
            }

            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层

            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double f = 15;
            //主视图
            //图三
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + 15, v1.Y + f * 6);

            Vector2 v3 = new Vector2(v2.X, v2.Y + f * 5);
            Vector2 v4 = new Vector2(v2.X, v3.Y + f * 5);
            Vector2 v5 = new Vector2(v4.X + f * 12, v4.Y);
            Vector2 v6 = new Vector2(v2.X + f * 12, v2.Y);
            //
            Vector2 v7 = new Vector2(v6.X, v6.Y - f * 2);
            Vector2 v8 = new Vector2(v5.X, v5.Y + f * 2);
            //
            Vector2 v9 = new Vector2(v7.X + f * 10, v7.Y);
            Vector2 v10 = new Vector2(v8.X + f * 10, v8.Y);
            //
            Vector2 v11 = new Vector2(v9.X, v9.Y + f * 10);
            Vector2 v12 = new Vector2(v10.X, v10.Y - f * 10);
            //
            Vector2 v13 = new Vector2(v11.X + f * 6, v11.Y);
            Vector2 v14 = new Vector2(v12.X + f * 6, v12.Y);
            //
            Vector2 v15 = new Vector2(v2.X, v2.Y + f * 10);
            Vector2 v16 = new Vector2(v15.X + f, v15.Y);
            //
            Vector2 v17 = new Vector2(v2.X - 10, v2.Y);
            Vector2 v18 = new Vector2(v17.X, v17.Y - f);
            // 线段
            //主视图
            //图三
            Vector2[] Line1 = { v3, v2 };
            fun.drawBLine(dxf, Line1, 2.8, contour);
            Vector2[] Line2 = { v4, v3 };
            fun.drawBLine(dxf, Line2, 2.8, contour);
            Vector2[] Line3 = { v4, v5 };
            fun.drawBLine(dxf, Line3, 2.8, contour);
            Vector2[] Line4 = { v2, v6 };
            fun.drawBLine(dxf, Line4, 2.8, contour);
            Vector2[] Line5 = { v5, v6 };
            fun.drawBLine(dxf, Line5, 2.8, contour);
            Vector2[] Line6 = { v7, v6 };
            fun.drawBLine(dxf, Line6, 2.8, contour);
            Vector2[] Line7 = { v5, v8 };
            fun.drawBLine(dxf, Line7, 2.8, contour);
            Vector2[] Line8 = { v7, v9 };
            fun.drawBLine(dxf, Line8, 2.8, contour);
            Vector2[] Line9 = { v8, v10 };
            fun.drawBLine(dxf, Line9, 2.8, contour);
            Vector2[] Line10 = { v9, v10 };
            fun.drawBLine(dxf, Line10, 2.8, contour);
            Vector2[] Line11 = { v11, v13 };
            fun.drawBLine(dxf, Line11, 2.8, contour);
            Vector2[] Line12 = { v12, v14 };
            fun.drawBLine(dxf, Line12, 2.8, contour);
            Vector2[] Line13 = { v13, v14 };
            fun.drawBLine(dxf, Line13, 2.8, contour);
            //
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v2.X - f, v2.Y + f * 5), new Vector2(v2.X + f * 30, v2.Y + f * 5) },0.1, centre, Linetype.Center);
            //
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 6;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 12;
            double offset = 6;
            LinearDimension dim1 = new LinearDimension(new Line(v8, v10), offset * 8, 360, dimensionStyle);
            dim1.UserText = " XX";
            dxf.AddEntity(dim1);
            LinearDimension dim2 = new LinearDimension(new Line(v15, v16), offset * 15, 360, dimensionStyle);
            dim2.UserText = " 15";
            dxf.AddEntity(dim2);
            LinearDimension dim3 = new LinearDimension(new Line(v17, v18), offset * 5, 90, dimensionStyle);
            dim3.UserText = " 15";
            dxf.AddEntity(dim3);
            string path = Convert.ToString(data["path"]);
            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }

        //
        public static void Matingpoint108(Dictionary<string, Object> data)    //转换器,旋转对称
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中心线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层
            //作图
            //参数
            double r = 13.5;
            double r1 = 30;
            double f = 1;
            double pi = Math.PI;
            double par = 28 * pi / 180;
            string path = Convert.ToString(data["path"]);
            //主视图
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X - f, v1.Y + f);
            Vector2 v3 = new Vector2(v1.X - f, v1.Y - f);
            Vector2 v4 = new Vector2(v2.X, v2.Y + r - r / 3);
            Vector2 v5 = new Vector2(v4.X + f, v4.Y + f / 2 / Math.Tan(par));
            Vector2 v6 = new Vector2(v5.X + r + f * 6, v5.Y + f * 4 / 5);
            Vector2 v7 = new Vector2(v1.X + f * 3.6, v1.Y);
            Vector2 v8 = new Vector2(v7.X + f, v7.Y - f / 2 / Math.Tan(par));
            Vector2 v9 = new Vector2(v8.X, v8.Y - f * 6);
            Vector2 v10 = new Vector2(v9.X - f, v9.Y - f / 2 / Math.Tan(par));
            Vector2 v11 = new Vector2(v10.X - f * 3.6, v10.Y);
            Vector2 v12 = new Vector2(v11.X - f, v11.Y - f);
            Vector2 v13 = new Vector2(v12.X, v12.Y - r + r / 3);
            Vector2 v14 = new Vector2(v13.X + f, v13.Y - f / 2 / Math.Tan(par));
            Vector2 v15 = new Vector2(v14.X + r + f * 6, v14.Y - f * 4 / 5);
            //
            Vector2 v16 = new Vector2(v6.X + f, v6.Y);
            Vector2 v17 = new Vector2(v15.X + f, v15.Y);
            Vector2 v18 = new Vector2(v16.X, v16.Y + f * 5);
            Vector2 v19 = new Vector2(v17.X, v17.Y - f * 5);
            Vector2 v20 = new Vector2(v18.X + r, v18.Y);
            Vector2 v21 = new Vector2(v19.X + r, v19.Y);
            //
            Vector2 v22 = new Vector2(v20.X, v16.Y + f);
            Vector2 v23 = new Vector2(v21.X, v17.Y - f);
            Vector2 v24 = new Vector2(v22.X + r / 1.3, v22.Y);
            Vector2 v25 = new Vector2(v23.X + r / 1.3, v23.Y);
            Vector2 v26 = new Vector2(v24.X, v24.Y + f * 1.6);
            Vector2 v27 = new Vector2(v25.X, v25.Y - f * 1.6);
            Vector2 v28 = new Vector2(v26.X + r / 1.3, v26.Y);
            Vector2 v29 = new Vector2(v27.X + r / 1.3, v27.Y);
            //
            Vector2 v30 = new Vector2(v29.X, v29.Y + f / 2);
            Vector2 v31 = new Vector2(v30.X + f * 5, v30.Y);
            Vector2 v32 = new Vector2(v28.X, v28.Y - f / 2);
            Vector2 v33 = new Vector2(v32.X + f * 5, v32.Y);

            Vector2 v34 = new Vector2(v31.X, v31.Y + f * 9);
            Vector2 v35 = new Vector2(v30.X, v34.Y);

            Vector2 v36 = new Vector2(v33.X, v33.Y - f * 9);
            Vector2 v37 = new Vector2(v30.X, v36.Y);

            Vector2 v38 = new Vector2(v30.X, v36.Y - f);
            Vector2 v39 = new Vector2(v38.X + r, v38.Y);

            Vector2 v40 = new Vector2(v30.X, v34.Y + f);
            Vector2 v41 = new Vector2(v38.X + r, v40.Y);
            Vector2 v42 = new Vector2(v39.X + f, v39.Y - f);
            Vector2 v43 = new Vector2(v41.X + f, v41.Y + f);
            //

            Vector2 v44 = new Vector2(v1.X + r + f * 7, v1.Y - f * 4);

            Vector2 v45 = new Vector2(v44.X - f * 10, v44.Y + f * 8);
            Vector2 v46 = new Vector2(v44.X, v44.Y + f * 3);
            //
            Vector2 v47 = new Vector2(v1.X + r + f * 7 + r * 2 + f * 7, v1.Y - f * 4);
            // 线段
            //主视图
            Vector2[] Line1 = { v1, v2 };
            fun.drawBLine(dxf, Line1, 0.5, contour);
            //Vector2[] Line2 = { v1, v3 };
            //fun.drawBLine(dxf, Line2, 0.08, contour);
            Vector2[] Line3 = { v2, v4 };
            fun.drawBLine(dxf, Line3, 0.5, contour);
            LwPolyline Arc1 = new LwPolyline();
            Arc1.Vertexes.Add(new LwPolylineVertex(v4));
            Arc1.Vertexes.Add(new LwPolylineVertex(v5));
            Arc1.Vertexes[0].Bulge = -f / 2 * Math.Tan(par / 1.3) / Math.Sin(par);
            fun.PolyFill(dxf, Arc1, 0.5, contour);
            Vector2[] Line4 = { v5, v6 };
            fun.drawBLine(dxf, Line4, 0.5, contour);
            Vector2[] Line5 = { v1, v7 };
            fun.drawBLine(dxf, Line5, 0.5, contour);
            LwPolyline Arc2 = new LwPolyline();
            Arc2.Vertexes.Add(new LwPolylineVertex(v7));
            Arc2.Vertexes.Add(new LwPolylineVertex(v8));
            Arc2.Vertexes[0].Bulge = -f / 2 * Math.Tan(par / 1.3) / Math.Sin(par);
            fun.PolyFill(dxf, Arc2, 0.5, contour);
            Vector2[] Line6 = { v8, v9 };
            fun.drawBLine(dxf, Line6, 0.5, contour);
            LwPolyline Arc3 = new LwPolyline();
            Arc3.Vertexes.Add(new LwPolylineVertex(v9));
            Arc3.Vertexes.Add(new LwPolylineVertex(v10));
            Arc3.Vertexes[0].Bulge = -f / 2 * Math.Tan(par / 1.3) / Math.Sin(par);
            fun.PolyFill(dxf, Arc3, 0.5, contour);
            Vector2[] Line8 = { v10, v11 };
            fun.drawBLine(dxf, Line8, 0.5, contour);
            Vector2[] Line9 = { v12, v11 };
            fun.drawBLine(dxf, Line9, 0.5, contour);
            Vector2[] Line10 = { v12, v13 };
            fun.drawBLine(dxf, Line10, 0.5, contour);
            LwPolyline Arc4 = new LwPolyline();
            Arc4.Vertexes.Add(new LwPolylineVertex(v13));
            Arc4.Vertexes.Add(new LwPolylineVertex(v14));
            Arc4.Vertexes[0].Bulge = f / 2 * Math.Tan(par / 1.3) / Math.Sin(par);
            fun.PolyFill(dxf, Arc4, 0.5, contour);
            Vector2[] Line11 = { v14, v15 };
            fun.drawBLine(dxf, Line11, 0.5, contour);
            Vector2[] Line12 = { v6, v15 };
            fun.drawBLine(dxf, Line12, 0.5, contour);
            Vector2[] Line13 = { v6, v16 };
            fun.drawBLine(dxf, Line13, 0.5, contour);
            Vector2[] Line14 = { v17, v15 };
            fun.drawBLine(dxf, Line14, 0.5, contour);
            Vector2[] Line15 = { v17, v16 };
            fun.drawBLine(dxf, Line15, 0.5, contour);
            Vector2[] Line16 = { v18, v16 };
            fun.drawBLine(dxf, Line16, 0.5, contour);
            Vector2[] Line17 = { v19, v17 };
            fun.drawBLine(dxf, Line17, 0.5, contour);
            Vector2[] Line18 = { v18, v20 };
            fun.drawBLine(dxf, Line18, 0.5, contour);
            Vector2[] Line19 = { v19, v21 };
            fun.drawBLine(dxf, Line19, 0.5, contour);
            Vector2[] Line20 = { v20, v21 };
            fun.drawBLine(dxf, Line20, 0.5, contour);
            Vector2[] Line21 = { v22, v24 };
            fun.drawBLine(dxf, Line21, 0.5, contour);
            Vector2[] Line22 = { v23, v25 };
            fun.drawBLine(dxf, Line22, 0.5, contour);
            Vector2[] Line23 = { v25, v24 };
            fun.drawBLine(dxf, Line23, 0.5, contour);
            Vector2[] Line24 = { v28, v26 };
            fun.drawBLine(dxf, Line24, 0.5, contour);
            Vector2[] Line25 = { v24, v26 };
            fun.drawBLine(dxf, Line25, 0.5, contour);
            Vector2[] Line26 = { v25, v27 };
            fun.drawBLine(dxf, Line26, 0.5, contour);
            Vector2[] Line27 = { v29, v27 };
            fun.drawBLine(dxf, Line27, 0.5, contour);
            Vector2[] Line28 = { v29, v28 };
            fun.drawBLine(dxf, Line28, 0.5, contour);
            Vector2[] Line29 = { v30, v31 };
            fun.drawBLine(dxf, Line29, 0.5, contour);
            Vector2[] Line30 = { v32, v33 };
            fun.drawBLine(dxf, Line30, 0.5, contour);
            Vector2[] Line31 = { v31, v34 };
            fun.drawBLine(dxf, Line31, 0.5, contour);
            Vector2[] Line32 = { v35, v34 };
            fun.drawBLine(dxf, Line32, 0.5, contour);
            Vector2[] Line33 = { v36, v33 };
            fun.drawBLine(dxf, Line33, 0.5, contour);
            Vector2[] Line34 = { v36, v37 };
            fun.drawBLine(dxf, Line34, 0.5, contour);
            Vector2[] Line35 = { v38, v39 };
            fun.drawBLine(dxf, Line35, 0.5, contour);
            Vector2[] Line36 = { v40, v41 };
            fun.drawBLine(dxf, Line36, 0.5, contour);
            Vector2[] Line37 = { v39, v41 };
            fun.drawBLine(dxf, Line37, 0.5, contour);
            Vector2[] Line38 = { v39, v42 };
            fun.drawBLine(dxf, Line38, 0.5, contour);
            Vector2[] Line39 = { v43, v41 };
            fun.drawBLine(dxf, Line39, 0.5, contour);
            Vector2[] Line40 = { v43, v42 };
            fun.drawBLine(dxf, Line40, 0.5, contour);
            LwPolyline poly1 = new LwPolyline();
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v44, 0, f * 3)));
            poly1.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v44, Math.PI, f * 3)));
            poly1.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly1.Vertexes.Add(new LwPolylineVertex(fun.Polar(v44, 0, f * 3)));
            fun.PolyFill(dxf, poly1, 0.25, skdimensioning);
            fun.drawPlinetype(dxf, new Vector2[] { new Vector2(v1.X - f * 2.6, v1.Y - f * 4), new Vector2(v1.X + r1 * 2 + r, v1.Y - f * 4) },0.15, centre, Linetype.Center);
            DimensionStyle dimensionStyle = fun.CreateDimStyle();
            dimensionStyle.ArrowSize = 1;
            dimensionStyle.DimArrow1 = DimensionArrowhead.Closedfilled;
            dimensionStyle.DimArrow2 = DimensionArrowhead.Closedfilled;
            dimensionStyle.TextHeight = 1.8;
            double offset = 6;
            LinearDimension dim1 = new LinearDimension(new Line(v18, v28), offset * 2, 360, dimensionStyle);
            dim1.UserText = "a ";
            dxf.AddEntity(dim1);
            //Vector2 vstart = new Vector2(0, 0);
            //Vector2 vcen = new Vector2(50, 50);
            //Vector2 vend = new Vector2(170, 0);
            //Arc arc6 = fun.DrawArc(vstart, vcen, vend);

            //RadialDimension dimrad2 = new RadialDimension(arc6, 10, offset, dimensionStyle);//DimensionStyle.Default);
            //dimrad2.UserText = "1";
            //dxf.AddEntity(dimrad2);
            LwPolyline poly2 = new LwPolyline();
            poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v47, 0, f * 2)));
            poly2.Vertexes[0].Bulge = Math.Tan(Math.PI / 4);
            poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v47, Math.PI, f * 2)));
            poly2.Vertexes[1].Bulge = Math.Tan(Math.PI / 4);
            poly2.Vertexes.Add(new LwPolylineVertex(fun.Polar(v47, 0, f * 2)));
            fun.PolyFill(dxf, poly2, 0.25, skdimensioning);
            //
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }

    }
}
